/*
           C u s t o m   J Q u e r y   c o d e   f o r 
            G r e e n W r i g h t E n e r g y . c o m
________________________________________________________________
*/

// Include GWE-Splash Flash Animation
var flashvars = {};
var params = {};
params.quality = "best";
params.wmode = "transparent";
var attributes = {};
attributes.id = "GreenWrightEnergy-Splash";
swfobject.embedSWF("flash/GreenWrightEnergy-Splash.swf", "GWE-Splash", "825", "515", "10.0.0", false, flashvars, params, attributes);


$(document).ready(function(){

	// On the Bottom_Navigation: Get rid of the "middot" background image and padding from the first link 
	$("#Bottom_Navigation a:first").css({"background":"none","paddingLeft":"0"});
	$("#Bottom_Navigation a:last").css({"background":"none","paddingLeft":"0"});

	// Create a new function to adjust the background attachment based on the browser window size
	function adjustBG(){
		winHeight = $(window).height();   // returns height of browser viewport
		bodHeight = $('body').height(); // returns height of HTML document
	
		if(winHeight > bodHeight){
			$('body').css({backgroundAttachment : 'fixed'});	
		} else {
			$('body').css({backgroundAttachment : 'scroll'});	
		}
	}
	
	// Run the adjustBG function when the browser gets resized
	$(window).resize(function() {
		adjustBG();
	});

	// Run the adjustBG function page is done loading
	adjustBG();
	
});

