jQuery(document).ready(function(){
	
	var FullscreenrOptions = {  width: 1300, height: 900, bgID: '#background' };
	jQuery.fn.fullscreenr(FullscreenrOptions);
		
	function initPageAnimation (){
		// VERTICAL
		if (jQuery('.vertical').length != 0){
			jQuery('.vertical').css({ "height" : jQuery(window).height()-60+"px", "left": "-500px"})
			.animate({ "left": "0px" }, {duration: 2000, easing: 'easeOutQuint'});
		} else if (jQuery('.horizontal').length != 0){
		// HORIZONTAL
		 	var dest = ((jQuery(window).height() - jQuery('.horizontal').outerHeight())/2)-60;
			jQuery('.horizontal').css({"top":"-1000px"})
			.animate({ "top": dest+"px" }, {duration: 2000, easing: 'easeOutQuint'});
		}
		//jQuery('#top-image').css({"margin-top": (jQuery(window).height()-650)/2+"px"})
		//jQuery('#background-wrapper').css({"width": (jQuery(window).width+"px", "height": (jQuery(window).height+"px"})
		
	}
	initPageAnimation();
	
	
	function reposition (){
		jQuery('.vertical').css({ "height" : jQuery(window).height()-60+"px", "left": "0px"})
		var dest = ((jQuery(window).height() - jQuery('.horizontal').outerHeight())/2)-60;
		jQuery('.horizontal').css({"top":dest+"px"})
		//jQuery('#top-image').css({"margin-top": (jQuery(window).height()-650)/2+"px"})
	}	
		
	//fade facebook to hide white background
	jQuery('#facebook').hide().delay(800).fadeIn();
	
	//roll over effects
	jQuery('#next-description').hide();
	jQuery('#next-show').mouseenter(function() {
		jQuery('#next-description').slideToggle("slow");
	});
	jQuery('#next-show').mouseleave(function() {
		jQuery('#next-description').slideToggle("slow");
	});
	
	jQuery('#happy-hour-description').hide();
	jQuery('#happy-hour').mouseenter(function() {
		jQuery('#happy-hour-description').slideToggle("slow");
	});
	jQuery('#happy-hour').mouseleave(function() {
		jQuery('#happy-hour-description').slideToggle("slow");
	});
	
	
	jQuery(window).resize(function() {
		reposition();
	});
});
