function getWindowHeight(){
	var windowHeight = 0;
	if(typeof(window.innerHeight) == 'number'){
		windowHeight = window.innerHeight;
	}else{
		if(document.documentElement && document.documentElement.clientHeight){
			windowHeight = document.documentElement.clientHeight;
		}else{
			if(document.body && document.body.clientHeight){
				windowHeight = document.body.clientHeight;
			}
		}
	}
	return windowHeight;
}

/* $$$
   $$$    WINDOW WIDTH
   $$$
*/

function getWindowWidth(){
	var windowWidth = 0;
	if(typeof(window.innerWidth) == 'number'){
		windowWidth = window.innerWidth;
	}else{
		if(document.documentElement && document.documentElement.clientWidth){
			windowWidth = document.documentElement.clientWidth;
		}else{
			if(document.body && document.body.clientWidth){
				windowWidth = document.body.clientWidth;
			}
		}
	}
	return windowWidth;
}

function setFooter(){

	if (document.getElementById){
		var windowHeight = getWindowHeight();
		if (windowHeight>0){

			var wrapperHeight = document.getElementById('sub_content').offsetHeight;
			var footerElement = document.getElementById('footer');
			var footerHeight  = footerElement.offsetHeight;
			if (windowHeight - (wrapperHeight)>= 140) {
				footerElement.style.marginTop = (windowHeight - (wrapperHeight))-140  + 'px';
				//alert((windowHeight - (wrapperHeight))-43  + 'px')
			}else{
				
			}

		}
	}
	
}
$(document).ready(function(){
	$("a[rel^='prettyPhoto']").prettyPhoto();
});
