
// Main Scripts
// ----------------------------------------------------------------------------- //

// Link Scrubber Script
$(document).ready(function() {
	$("a").bind("focus",function(){if(this.blur)this.blur();});}
);


// Main Menu Script
$(document).ready(function() {

    $("ul#main_nav li").hover(function(){
    
        $(this).addClass("hover");
        $('ul:first',this).css('visibility', 'visible');
    
    }, function(){
    
        $(this).removeClass("hover");
        $('ul:first',this).css('visibility', 'hidden');
    
    });
    
    $("ul#main_nav li ul li:has(ul)").find("a:first").append(" &raquo; ");

});


// General Column One Navigation Uses HoverIntent Script to delay slideDown
$(document).ready(function () {

	$("ul#glasgow").hide();
	
	$("li#glasgowhotel").hoverIntent(function() {
	  $("ul#glasgow").slideDown(600);
	}, function() {
		$("ul#glasgow").slideUp(600);
	});
	
	$("ul#edinburgh").hide();
	
	$("li#edinburghhotel").hoverIntent(function() {
	  $("ul#edinburgh").slideDown(600);
	}, function() {
		$("ul#edinburgh").slideUp(600);
	});
	
});


// Gallery Slider
$(document).ready(function(){	
	$("#slider").easySlider({
		prevText: 'Previous',
		nextText: 'Next',		
		firstShow: false,
		lastShow: false,
		vertical: false,
		auto: false,
		continuous: true 		
	});
});	


// Lightbox Gallery Code
$(document).ready(function(){
	$("#slider a").lightBox();
});

// Lightbox Gallery Code
$(document).ready(function(){
	$(".gallery_thumbs a").lightBox();
});


// Hover Image Fade In and Out
$(document).ready(function(){
	
	$(".gallery_thumbs li img").fadeTo("fast", 0.5);
	
	$(".gallery_thumbs li img").hover(function(){
		$(this).fadeTo("fast", 1.0);
		},function(){
		$(this).fadeTo("fast", 0.5);
	});
});


// IE6 PNG Fix
$(document).ready(function(){ 
	$(document).pngFix(); 
});


// Select Language Dropdown
$(document).ready(function() {
	$("#google_translate_element").hide();
	$("#google_trans").click(function () {
		$("#google_translate_element").slideToggle(400);
		return false;
	});
});


// Gallery Cycle Code
$(document).ready(function() {
    $('#treat_rotator').cycle({ 
    fx:    'fade', 
    speed: 2000,
	timeout: 6000
 	});
});


// Form Validate Script
$(document).ready(function(){
	$("#registerform").validate();
});
 

