this.toggleFun = function(){
	$(".toggle-container").hide();
   	$(".trigger").toggle(function(e){
		e.preventDefault();
		$(this).addClass("active");
		}, function () {
		$(this).removeClass("active");    
         });
         $(".trigger").click(function(){
         $(this).closest("div").next(".toggle-container").slideToggle("fast");
		 return false;
          });
};

this.headerClickme = function(){
	$("#slidingTopContent").hide();
	$("#slidingTopTrigger").live("click", function(event) {
	$("#slidingTopContent").slideToggle("fast");
	$("#slidingTopTrigger").toggleClass('active')

	});
	
	};

jQuery.fn.fadeDelay = function() {delay = 0;return this.each(function() {$(this).delay(delay).fadeIn(250); delay += 400; });
};


Cufon.replace('h1')('#footer .reservations')('.tabbedul a')('.menubox h2')('h2')('.sendbutton')('#sidebar h3')('#pageheader')('',{textShadow:'1px 1px 1px rgba(0,0,0,0.5)'});

$(document).ready(function() {
$('.hotspot').hide();
$('.hotspot').delay(2000).fadeDelay();
toggleFun();
headerClickme();
$('#clouds').pan({fps: 30, speed: 0.6, dir: 'left'});
//menus setup


$tooltip = $('.hotspot');
$tooltip.live('mouseover mouseout', function(event){
if (event.type == 'mouseover') {
$(this).find('.spot-tip').stop(true, true).animate({ opacity: 'show', bottom: '25px' }, 300);
} else {
$(this).find('.spot-tip').stop(true, true).animate({ opacity: 'hide', bottom: '35px' }, 300);
}
});


$("#nav a, #subnav a").each(function() {var hreflink = $(this).attr("href");if (hreflink.toLowerCase()==location.href.toLowerCase()) {$(this).addClass("current");$(this).parents("ul li").children("a").addClass("current");}});
$("#mainnav li").hover(function () {$(this).addClass("active");},function () {$(this).removeClass("active");});

var $polaroids = jQuery('#polaroids .polaroiditems');
$polaroids.cycle({fx: 'scrollLeft',randomizeEffects: false,speed:300,timeout:7000,next:'#nextphoto',prev:'#prevphoto', pause: true});

 $('a.expand[href*=#]').click(function() {if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {var $target = $(this.hash);$target = $target.length && $target || $('[name=' + this.hash.slice(1) +']');if ($target.length) {var targetOffset = $target.offset().top - 50;$('html,body').animate({scrollTop: targetOffset}, 1000);return false;}}});
$("a.bigtarget, a.readmore").bigTarget({hoverClass: 'over',clickZone : 'div:eq(0)' });

});
