
// 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 = 35; //Minimum height of Div
var footerLarge = 500; //Maximum height of Div

$('#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

// Adjust Div to window width size on the fly

//Check for mobile browser
if(screen.width < 500 ||
 navigator.userAgent.match(/Android/i) ||
 navigator.userAgent.match(/webOS/i) ||
 navigator.userAgent.match(/iPhone/i) ||
 navigator.userAgent.match(/iPod/i)) {
//disable footer popup and show content if mobile 
$('#footer-popup').css("height",footerLarge);
$('#footer-popup').css("position","relative");
}
else {
//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;
	});
}
});

