$(function(){
	//var bod = "body";
	//GET SCREEN HEIGHT
	/*
	var win = window.innerHeight;
	//console.log("WINDOW: "+win);
	//GET HEADER HEIGHT
	var head = "#header";
	var header = boxWidthHeight(head);
	var h_height = header.height;
	//GET CONTENT HEIGHT
	var co = "#content";
	var content = boxWidthHeight(co);
	var c_height = content.height;
	//GET FOOTER HEIGHT
	var fo = "#footer";
	var footer = boxWidthHeight(fo);
	var f_height = footer.height;
	
	//TOTAL
	var total = parseInt(h_height+c_height+f_height);
	//console.log("TOTAL: "+total);
	var dif = win-total;
	console.log("DIF: "+dif);
	var t = dif/6;
	var to  = t+"px";
	//console.log("TOP: "+to);
	//var box_height = total+"px";
	$('#wrapper').css({marginTop:to});
	
	
	$('body').resize(function(){
	//	td = timeofDay();
		win = window.innerHeight;
		console.log("Windows: "+win);
		dif = win-total;
		t = dif/6;
		to  = t+"px";
		//console.log("TOP: "+to);
		$('#wrapper').css({marginTop:to});
	});
	*/

	$('#nav li').hover(
	        function () {
	            //show its submenu
	            $('ul', this).slideDown(100);
	            $(this).children('a').addClass('selected');
	        },
	        function () {
	            //hide its submenu
	            $('ul', this).slideUp(100);   
	            $(this).children('a').removeClass('selected');
	        }
	    );
	
	
});

function boxWidthHeight(element){
	//var elem = $(this);
	
	if(element != ""){
		var elem = $(element);
	} else {
		var elem = $(this);
	}
	
	var e = elem.offset();
	
	var w = elem.width();
	var h = elem.height();
	
	
	return bc = {width:w,height:h};
}

function openPopup(urlPassed) {
	newwindow=window.open(urlPassed,'SignUp','height=200,width=300,left=400,top=200,titlebar=no,scrollbars=yes,resizable=no,status=no,toolbar=no,menubar=no,location=no');
	if (window.focus) {newwindow.focus();}
	return false;
}

/*
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;
}
function setContent() {
	if (document.getElementById) {
		var windowHeight = getWindowHeight();
		if (windowHeight > 0) {
			var contentElement = document.getElementById('content');
			var contentHeight = contentElement.offsetHeight;
			if (windowHeight - contentHeight > 0) {
				contentElement.style.position = 'relative';
				contentElement.style.top = ((windowHeight / 2) - (contentHeight / 2)) + 'px';
			} else {
				contentElement.style.position = 'static';
			}
		}
	}
}
*/
/*
	window.onload = function() {
	setContent();
	}
	window.onresize = function() {
	setContent();
	} 
	*/

