jQuery(document).ready(function($) {
		
	function slideout_frontslider(){
		$('.frontslider-container').animate({'bottom': '0'});
	}
	
	function slidein_frontslider(){
		$('.frontslider-container').animate({'bottom': '-100px'});
	}
	
	// slide the frontslider
	$('.frontslider-container').css({'bottom': '-100px'});
	$('.frontslider-abscontainer').hoverIntent({
		over: slideout_frontslider, // function = onMouseOver callback (REQUIRED)    
		timeout: 800, // number = milliseconds delay before onMouseOut    
		out: slidein_frontslider // function = onMouseOut callback (REQUIRED)
	});
		
	// fancybox of photos
	$(".gallery a").fancybox({
		'transitionIn'	:	'elastic',
		'transitionOut'	:	'elastic',
		'speedIn'			:	600, 
		'speedOut'		:	300,
		'overlayColor': '#000',
		'overlayOpacity': '0.8',
		'padding': '0'
	});	
	
	var footer_open = false;
	var footer_height = $('#footer-content-container').outerHeight();
	$('#footer-content-hidewrap').css({'height': '0px', 'overflow': 'hidden'});
	$('#footer-content-container').css({'top': '100%'});
	
	$('#bar a').click(function(){
		if(footer_open == false) {
			$('#footer-content-hidewrap').css({'height': footer_height + 'px'});
			
			$('#footer-content-container').animate({'top': '0'}, 200);
			$('#bar').animate({ 'top': '-' + footer_height + 'px' }, 200);
			footer_open = true;
	
			
		} else if(footer_open == true) {
			setTimeout(function(){
				$('#footer-content-hidewrap').css({'height': '0px'});
			}, 250);
			
			$('#footer-content-container').animate({'top': '100%'}, 200);
			$('#bar').animate({ 'top': '0' }, 200);
			footer_open = false;
		}
		return false;
	});	
	
	// deactivate title hovers
	$(document).ready(function() {
	  $('[title]').each(function() {
	    $this = $(this);
	    $.data(this, 'title', $this.attr('title'));
	    $this.removeAttr('title');
	  });
	});
	
});

