// JavaScript Document
$(document).ready(function(){
	$('#slideContainer').css({
		height: '350px'
	});
$('#Thur').css	({						   
	width:'729px'				   
});
$('#Fri').css	({						   
width:'69px'
});
$('#Sat').css	({						   
width:'69px'
});
$('#Sun').css	({						   
	width:'69px'
});
						   

// Click Box 1
$('#Thur').hoverIntent(function(){

$('#Fri,#Sat,#Sun').animate	({
	width: '69px' 	 
}, 300, function(){
//animation complete							 
});
$('#Thur').animate	({
	width: '729px' 	 
}, 300, function(){
//animation complete							 
});

}, function(){});


//Click Box 2

$('#Fri').hoverIntent(function(){
$('#Thur,#Sat,#Sun').animate	({
	width: '69px' 	 
}, 300, function(){
//animation complete							 
});
$('#Fri').animate	({
	width: '729px'	 	 
}, 300, function(){
//animation complete							 
});
}, function(){});



//Click Box 3

$('#Sat').hoverIntent(function(){

$('#Thur,#Fri,#Sun').animate({
	width: '69px'	 	 
}, 300, function(){
//animation complete							 
});
$('#Sat').animate	({
	width: '729px'	 	 
}, 300, function(){
//animation complete							 
});
}, function(){});

$('#Sun').hoverIntent(function(){

$('#Thur,#Fri,#Sat').animate({
	width: '69px'	 	 
}, 300, function(){
//animation complete							 
});
$('#Sun').animate	({
	width: '729px'	 	 
}, 300, function(){
//animation complete							 
});
}, function(){});

$('#IE6').fadeIn();
    $("a[rel*=lightbox]").facebox();
	$('.closeIE6').click(function(){
	$('#IE6').fadeOut();
								  });
	
	$('a.contactBtn').click(function(){
	$('#contactDrop').show();								
	});
	
    $("ul.globalNav li").stop().hoverIntent(function(){
    
		$('ul:first',this).stop(true,true).slideDown('fast');
    
    }, function(){
     	$('ul:first',this).fadeOut('fast');
		
    });
	
    
$('.maplocal').hover(function(e){
	var toLoad =$(this).attr('href');

	$('<img class="detailCont" src="'+toLoad+'"/>').fadeIn()
	.appendTo('body');
	$('.detailCont').css('top', e.pageY + 320).css('left', e.pageX + 30);

} , 
function(){
	//hover out
	$('.detailCont').remove();

	
 });

$('.maplocal').mousemove(function(e) {
		$('.detailCont').css('top', e.pageY + -320).css('left', e.pageX + 30);
	});

 $('a[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;
                
                $('html,body').animate({scrollTop: targetOffset}, 1000);
                    
                return false;
                
            }
            
        }
        
    });


});