$(document).ready(function () {

	if($('Features'))
	{
		$('#Features .feature').each(function(){
			$(this).click(function(){
				window.location = $(this).find("a").attr("href")
			});

			$(this).mouseenter(function(){
				$(this).addClass("over");
			});

			$(this).mouseleave(function(){
				$(this).removeClass("over");
			});
		});
	}
					
	if($('#LeftMenu'))
	{
		$('#LeftMenu li').each(function(){

			$(this).click(function(){
				window.location = $(this).find("a").attr("href")
			});

			$(this).mouseenter(function(){
				$(this).addClass("over");
			});

			$(this).mouseleave(function(){
				$(this).removeClass("over");
			});
		});
	}

	if($('#FeatureTable'))
	{	
		$('#showHideTrialSetup').hide();
		$('#showHideSiteSetup').hide();	
		$('#showHideUserSetup').hide();
		$('#showHideScheduleSetup').hide();
		$('#showHideDocumentSetup').hide();
		$('#showHideDataEntrySetup').hide();
		$('#showHideOrganizerSetup').hide();

		$('#FeatureTable tbody.tr').each(function(){

			$(this).mouseenter(function(){
				$(this).addClass("over");
			});

			$(this).mouseleave(function(){
				$(this).removeClass("over");
			});
		});

	
		$('#TrialSetupRow').click(function() {
    		$('#showHideTrialSetup').slideToggle(400);
    		return false;
		});

		$('#SiteSetupRow').click(function() {
    		$('#showHideSiteSetup').slideToggle(400);
    		return false;
		});

		$('#UserSetupRow').click(function() {
    		$('#showHideUserSetup').slideToggle(400);
    		return false;
		});

		$('#ScheduleSetupRow').click(function() {
    		$('#showHideScheduleSetup').slideToggle(400);
    		return false;
		});
	
		$('#DocumentSetupRow').click(function() {
    		$('#showHideDocumentSetup').slideToggle(400);
    		return false;
		});

		$('#DataEntrySetupRow').click(function() {
    		$('#showHideDataEntrySetup').slideToggle(400);
    		return false;
		});
		
		$('#OrganizerSetupRow').click(function() {
    		$('#showHideOrganizerSetup').slideToggle(400);
    		return false;
		});



	}

	if($('Map'))
	{
		//loadMap();	
	}

});

function loadMap() {
    if (GBrowserIsCompatible()) {
 
	var map = new GMap2($('Map'));
        var point = new GLatLng(54.987199,-1.624711);
        map.setCenter(point, 12);
        map.addControl(new GSmallMapControl());

        var marker = new GMarker(point);
        map.addOverlay(marker);
	
       }
}