//JosephCortbawi.com JavaScript Functions

window.addEvent('domready', function() {
	new SmoothScroll({ duration:500 }, window);
	$('contactform').addEvent('submit', function(e) {
		e.stop();
		var log = $('ajax').empty().addClass('loading');
		this.set('send', {onComplete: function(response) { 
			log.set('html', response);
			log.removeClass('loading');
		}});
		this.send();
	});
});

function btmResize() {
	myHeight = 0;
	if(typeof(window.innerHeight) == 'number') {
		myHeight = window.innerHeight;
	} else if(document.documentElement && document.documentElement.clientHeight) {
		myHeight = document.documentElement.clientHeight;
	} else if(document.body && document.body.clientHeight) {
		myHeight = document.body.clientHeight;
	}
	if(myHeight < 667) {
		document.getElementById("btmspace").style.height = "30px";
	} else {
	document.getElementById("btmspace").style.height = myHeight - 637 +"px";
	}
}

function loadScripts() {
	Shadowbox.init();
	btmResize();
}

Shadowbox.loadSkin('classic', 'skin');
window.onload = loadScripts;
window.onresize = btmResize;