// JQUERY ON DOM READY

$(document).ready(function() { 

	$("ul.sf-menu").superfish({
		
		dropShadows:   false,
		autoArrows: false
	
	});
	
	jQuery('#carousel').jcarousel({
		auto: 6,
		wrap: "both",
		scroll: 1
	}); 
	
	$(".btn_slide").click(function(){
		$("#bt_con_js_acc_content").slideToggle("slow");
		$('.bt_con_js_acc_link').toggleClass("active");
		return false;
	});
	
	$(".booking_table_table a").hover(function() {
		
		if (!$('body').hasClass('ie') && !$('body').hasClass('ie6')) {
			
			$(this).next("em").animate({opacity: "show", top: "-82"}, "slow");
			return false;
			
		} else {
			
			$(this).next("em").css('display', 'block');
			return false;
			
		}
	
	}, function() {
		
		if (!$('body').hasClass('ie') && !$('body').hasClass('ie6')) {
			
			$(this).next("em").animate({opacity: "hide", top: "-92"}, "fast");
			return false;
			
		} else {
				
			$(this).next("em").css('display', 'none');
			return false;
				
		}
	
	});
	
	if ($('body').width() < 1280 && $('body').width() > 1024) {
		
		var src = $('#header_innerwrap img').attr('src');
		var srcArr = src.split(".");
		var newSrc = srcArr.join("_1280.");
		$('#header_innerwrap img').attr({
			
			src: newSrc,
			width: '1400',
			height: '445'
			
		});
		
		$('.jcarousel-skin-pph .jcarousel-container-horizontal').attr('style', 'top:290px;')
		$('#header_innerwrap').attr('style', 'margin-left:-700px;width:1400px;');
		$('#header').attr('style', 'height:445px;');
		
	}
	
	if ($('body').width() < 1024) {
		
		var src = $('#header_innerwrap img').attr('src');
		var srcArr = src.split(".");
		var newSrc = srcArr.join("_1024.");
		$('#header_innerwrap img').attr({
			
			src: newSrc,
			width: '1150',
			height: '309'
			
		});
		
		$('.jcarousel-skin-pph .jcarousel-container-horizontal').attr('style', 'top:154px;')
		$('#header_innerwrap').attr('style', 'margin-left:-575px;width:1150px;');
		$('#header').attr('style', 'height:309px;');
		
	}	
        
});  
