
// For iphone

//stick the footer at the bottom of the page if we're on an iPad/iPhone due to viewport/page bugs in mobile webkit
if(navigator.platform == 'iPad' || navigator.platform == 'iPhone' || navigator.platform == 'iPod')
{
	 $("#footer").css("position", "static");
	 $("#footer").css("height", 180);
	 $("#footer-clickme").css("display", "none");
	 
}
else {


var toggle = 0;

toggle = 1;
$("#footer").animate({
	height: 0
	}, 1000, function() {
		
		}
);


$("#footer").click(function(event) {
	event.stopPropagation();
	if ((event.target.nodeName != "INPUT") && (event.target.nodeName !="A") && (event.target.nodeName != "BUTTON")) {
		if (toggle == 1) 
		{
			toggle = 0;
			$("#footer").animate({
				height: 140
			}, 1000, function() {
				
				}
			);
		}
		else
		{
		
		toggle = 1;
			$("#footer").animate({
				height: 0
			}, 1000, function() {

				}
			);
		}
	}
});

$("body").click(function(event) {
	if ((event.target.nodeName != "INPUT") && (event.target.nodeName !="A") && (event.target.nodeName != "BUTTON")) {
		if (toggle == 0) 
		{
			toggle = 1;
			$("#footer").animate({
				height: 0
			}, 1000, function() {

				}
			);
		}
	}
});
}
