/**
 * Javascript for urban thrist home page
 * 
 * author: BrandExponents Team
 * website: http://www.brandexponents.com
 */
jQuery(document).ready(function(){
	// On Resize
	jQuery(window).resize(function() {
		onWindowResize();
	});
	onWindowResize();
});


// All Functions
// #1
function onWindowResize(){
	jQuery('#home-content-wrap').css( 'height',100);
	getBrowserWidthHeight();
	//var browserWidth = browserWidth; //jQuery(window).width();  
	//var browserHeight = browserHeight; //jQuery(window).height();
	jQuery('#home-content-wrap').css( 'height', (browserHeight - (jQuery('#header').outerHeight(true) + jQuery('#footer').outerHeight(true))) );
	
	//To Position EnterToWin Button
	jQuery('#enter-to-win').css( 'top', (browserHeight * 35 / 100) );
	
	//To Position JoinTheClub Button
	jQuery('#join-the-club').css( 'right', (browserWidth * 55 / 100) );
	
	//To Position Events Button
	jQuery('#events').css( 'left', (browserWidth * 55 / 100) );
}
// #2
function getBrowserWidthHeight(){
	if( typeof( window.innerWidth ) == 'number' ) { 
		//Non-IE 
		browserWidth = window.innerWidth;
		browserHeight = window.innerHeight; 
	}
	else if( document.documentElement && 
	( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { 
		//IE 6+ in 'standards compliant mode' 
		browserWidth = document.documentElement.clientWidth; 
		browserHeight = document.documentElement.clientHeight; 
	} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) { 
		//IE 4 compatible 
		browserWidth = document.body.clientWidth; 
		browserHeight = document.body.clientHeight; 
	}	
}
