
// Footer popup window effect
$(document).ready(function(){
	
//Add window icon
$('#footer-popup').append('<div id="iconbutton"></div>'); //Add the icon in top left corner.
	
//Set default size settings
var footerSmall = 25; //Minimum height of Div
var footerLarge = 300; //Maximum height of Div
var windowWidth = document.documentElement.clientWidth;

$('#footer-popup').width(windowWidth); //Set Div to width of browser window
$('#footer-popup').css("height",footerSmall); //adjust Div height
$('#footer-popup').css("position","fixed"); // Set position to not move
$('#footer-popup').css("bottom","0"); // Set position to bottom
$('#footer-cities').css("position","fixed"); // Set position to not move
$('#footer-cities').css("bottom","0"); // Set position to bottom
$('#social-icons').css("visibility","visible"); // Set position to bottom
$(".active-City").hide(); //Hide all city content

// Adjust Div to window width size on the fly
$(window).resize(function() {
	var windowWidth = document.documentElement.clientWidth;
	$('#footer-popup').width(windowWidth); //Set Div to width of browser window width
});

//On Mouseover
$('#footer-popup').mouseover(function(){
	$('#footer-popup').animate( { height: footerLarge }, 200 );
	$('#footer-popup').stop();
	return false; 
	});

//On Mouseout
$('#footer-popup').mouseout(function(){
	$('#footer-popup').stop().animate( { height: footerSmall }, 200 );
	return false;
	});
});

//Cities popup
$('a[href^=#]').click(function(){
	var activeCity = $(this).find("a").attr("href");
	$('activeCity').animate( { height: 700 }, 200 );
	$('activeCity').stop();
	return false; 
	});
