/* jQuery launch */

jQuery.noConflict();
jQuery(document).ready(function(){
	jQuery("a[rel^='prettyPhoto']").prettyPhoto();
	jQuery(".portfolioItem:first").css("margin-left", 0);
});



/* window height function (used to place footer */

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;
}



/* place footer at bottom of browser window */

function setFooter() {
	if (document.getElementById) {
		var windowHeight=getWindowHeight();
		var contentHeight=document.getElementById('wrapper').offsetHeight;
		var footerElement=document.getElementById('footer');
		var footerHeight=footerElement.offsetHeight;
		var finalTop=windowHeight-footerHeight;
		footerElement.style.top=(windowHeight-footerHeight)+'px';
/*
		jQuery("#footer").animate({ 
			top: finalTop
		}, 1500 );
*/
	}
}


window.onload = function() {
  setFooter();
}
window.onresize = function() {
  setFooter();
}



/* validate hosting order form */

function validateHosting(formName) { 
	if(document[formName].os0.value == "") {
		alert("Please enter your website URL."); 
		return false; 
	} 
	return true;
}
