jQuery.noConflict();

var mapActive = false;

jQuery(document).ready(function(){
	jQuery('#close').click(function(){ 
		if (mapActive) {
			jQuery('#containerFooter').animate({
				'bottom': '0px'
			}, 1200);
			jQuery('#containerSearch').animate({
				'top': '30%'
			}, 1200);
			mapActive = false;
		} else {
			jQuery('#containerFooter').animate({
				'bottom': 30-jQuery('#showcase').height()+'px'
			}, 1200);
			jQuery('#containerSearch').animate({
				'top': '45%'
			}, 1200);
			mapActive = true;
		}
	});
	
	jQuery(window).bind("unload", function() {});
	
	jQuery("body").css("display", "none");
	
	jQuery("body").hide();

	jQuery("body").fadeIn(1000);
    
	jQuery("a").click(function(event){
		event.preventDefault();
		linkLocation = this.href;
		jQuery("body").fadeOut(600, redirectPage);		
	});
	
	jQuery('#containerBackgroundImage').css("height", jQuery('#containerContent').height());
		
	function redirectPage() {
		window.location = linkLocation;
	}
	
});

jQuery(window).resize(function() {
	jQuery('#containerBackgroundImage').css("height", jQuery('#containerContent').height());
});

