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)'});

this.searchinput = function(){
/* CONFIG */		
var $search_input = jQuery('#searchform');
$search_input.mouseenter (function() {$(".search-hover").stop().animate({'opacity': 1}, 450, 'easeOutSine').parent().children('input#s').css('color','#000000')},$search_input.mouseleave(function (){$(".search-hover").stop().delay(60).animate({'opacity': 0}, 450, 'easeOutExpo').parent().children('input#s').css('color','#ffffff')}));
};

$(document).ready(function() {
//menus setup
$('.hotspot').hide();
$('.hotspot').delay(2000).fadeDelay();

$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);
}
});

toggleFun();
headerClickme();

$('#quickcontact').click(function(){var w = $(this).outerWidth();$(this).animate({ right: -w}, 200,function(){$('#quickcontact-expanded').animate({right:-10}, 200);});return false;});
$('.qc-close').click(function(){$('#quickcontact-expanded').animate({right: -340}, 200,function(){$('#quickcontact').animate({right: -10}, 200);$('.h').fadeIn('fast');});return false;});
$("#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");}});
	$("#nav li a").hover(function () {$(this).parent().addClass("active");},function () {$(this).parent().removeClass("active");});
	$('#searchform').append('<span class="search-hover"></span>');

	$('.search-hover').css('opacity', '0');

var $homecarousel = jQuery('#homecarousel .homeitems'); 
$homecarousel.after('<div id="carouseldots">').cycle({fx: 'fade',timeout: 0, randomizeEffects: false,speed:500,timeout:0,next:'.next',prev:'.prev',pager:'#carouseldots', pauseOnPagerHover: true, pause: true,before:function(){$(this).children('.carouselcontent').hide();},after: function(){$(this).children('.carouselcontent').delay(200).fadeIn(1200);}});
$("#next,#prev").mouseover(function () {$(this).css("cursor","pointer");});

$('.next,.prev').hide();
var $control_hover = jQuery('#carouseldots,.next,.prev');
$control_hover.mouseenter (function() {$('.next,.prev').stop().show()},$control_hover.mouseleave(function (){$('.next,.prev').stop().hide()}));
 $('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)' });

var $boxes = jQuery(".col4-1");
if ( $boxes.length ) {$boxes.each(function (index, domEle) {if ((index+1)%4 == 0) jQuery(domEle).addClass("lastli");});} 

});
