// JavaScript Document 
$(function(){ 
	
	$("ul.sf-menu").supersubs({ 
		minWidth:    12,   // minimum width of sub-menus in em units 
		maxWidth:    27,   // maximum width of sub-menus in em units 
		extraWidth:  1     // extra width can ensure lines don't sometimes turn over 
						   // due to slight rounding differences and font-family 
	}).superfish();  // call supersubs first, then superfish, so that subs are 
					 // not display:none when measuring. Call before initialising 
					 // containing tabs for same reason. 
					 
	// innerfade - http://medienfreunde.com/lab/innerfade/   
	$('#fader').innerfade({ speed: 700, timeout: 4000, type: 'sequence', containerheight: '383px' });
	$('#sideHeadFader').innerfade({ speed: 700, timeout: 5000, type: 'sequence', containerheight: '120px' });
	$('#imgFader').innerfade({ speed: 700, timeout: 5000, type: 'sequence', containerheight: '220px' });
	$('#hotelFader').innerfade({ speed: 700, timeout: 5000, type: 'sequence', containerheight: '170px' });
	
	
	// prettyPhoto - http://www.no-margin-for-errors.com/projects/prettyPhoto-jquery-lightbox-clone/   
	$("a[rel^='prettyPhoto']").prettyPhoto();
	
	// form validate - http://docs.jquery.com/Plugins/Validation
	$("#newsletterForm").validate();
	
	
	// *** Login Panel animation
	$("#open").click(function () { 
      $("#Panel").slideDown(1000); 
    });
	$("#close").click(function () { 
      $("#Panel").slideUp(250); 
    });
	
	// *** Homepage Google Map animation
	$('.google_map_foot').css('cursor', 'pointer') .toggle(
	   function(){
		$('#map').animate({ 
			height: "700px"
		  }, 1000 );
		$('#side_bar').animate({ 
			height: "690px"
		  }, 1000 );
		$( '.google_map_foot' ).css( 'backgroundImage', 'url(images/bg_map_foot1.jpg)' );
	  },
	  function(){
		$('#map').animate({ 
			height: "400px"
		  }, 1000 );
		$('#side_bar').animate({ 
			height: "390px"
		  }, 1000 );
		$( '.google_map_foot' ).css( 'backgroundImage', 'url(images/bg_map_foot.jpg)' );
	  }
	); 

}); 
 