$(function(){
$('.selecter2').mobilyselect({
    collection: 'all', // shows specified collection on startup
    animation: 'fade', // type of animation, available options: plain, fade, absolute
    duration: 500, // duration of animation
    listClass: 'selecterContent', // main container
    btnsClass: 'selecterBtns',
    btnActiveClass: 'active', // add class name to the button
    elements: 'li',
    onChange: function(){}, // call the function when collection changes
    onComplete: function(){} // call the function when animation is completed
});
});
	
	$(window).load(function() {
        $('#sliderholder').nivoSlider({
		effect:'sliceDown',
		slices:8,
		animSpeed:500,
		pauseTime:4000,
		startSlide:0, //Set starting Slide (0 index)
		directionNav:true, //Next & Prev
		directionNavHide:false, //Only show on hover
		controlNav:true, //1,2,3...
		keyboardNav:true, //Use left & right arrows
		pauseOnHover:true, //Stop animation while hovering
		manualAdvance:false, //Force manual transitions
		captionOpacity:0.8 //Universal caption opacity
		});
    });

$(function() {
			if ($('#sliderholder-cycle').length) {
			jQuery('#sliderholder-cycle').cycle({
				fx: 'fade',
				pager: '.slidernav',
				prev:    '.sliderprev',
        		next:    '.slidernext',
				speed: 1000,
				timeout:0,  // milliseconds between slide transitions (0 to disable auto advance
				pagerEvent: 'click',
				requeueOnImageNotLoaded: true,
    			pause: 1, //Stop animation while hovering
    			cleartype: 1
});
			jQuery('#sliderholder-cycle').css("display", "block");
			jQuery('.slidernav').css("display", "block");
			}
}); 

$(document).ready(function() {


 $('.sc_tab').click(function() {
    $('.sc_tab').removeClass('sc_tab_active');
    $(this).addClass('sc_tab_active');
    var which = $(this).attr('title');
    $(this).parent().parent().find('.sc_tab_single_box').css('display','none');
    $(this).parent().parent().find('.sc_tab_single_box').eq(which).css('display','block');
  });

	
	$("body").css("display", "none");

    $("body").fadeIn(1000);
    
	$("a.transition").click(function(event){
		event.preventDefault();
		linkLocation = this.href;
		$("body").fadeOut(1000, redirectPage);		
	});
		
	function redirectPage() {
		window.location = linkLocation;
	}

$(".trigger").click(function(){
		$(".panel").toggle("fast");
		$(this).toggleClass("active");
		return false;
	});

$(".bookingtrigger").click(function(){
		$(".panel").toggle("fast");
		$(this).toggleClass("active");
		return false;
	});
	
});
