$(document).ready(function(){

var isIE6 = $.browser.msie && parseFloat($.browser.version) < 7;
if (isIE6 == true) {
	// lol no scripts for you
	// also take out 24bit pngs
	$('.newsPostDivider').css({ display: "none" });
	$('.newsPostHeader').css({ "margin-top": "1.5em" });
} else {
	
	// random flair images ----------------------------------------------------------------------------------------------------
	var $x = 1;
	var $numRandoms = 8;

	// news posts
	$('.newsPostHeader').each(function(){
		$(this).prepend('<div id="randomBGNews' + $x + '" class="randomBGNews"></div>');
		$('#randomBGNews' + $x + '').css({ "background-image": "url(http://www.wattoonline.com/wp-content/themes/watto/images/random" + (Math.ceil(Math.random()*$numRandoms)) + ".png)" });
		$x++;
	});
	// page contents - black
	$('#contentAbout, #contentWholesale, #contentContact, #contentOther').prepend('<div class="randomBG"></div>');
	$('.randomBG').css({ "background-image" : "url(http://www.wattoonline.com/wp-content/themes/watto/images/random" + (Math.ceil(Math.random()*$numRandoms)) + ".png)" })
	// gallery
	$('#contentGallery').prepend('<div class="randomBGGallery"></div>');
	$('.randomBGGallery').css({ "background-image" : "url(http://www.wattoonline.com/wp-content/themes/watto/images/randomWhite" + (Math.ceil(Math.random()*$numRandoms)) + ".png)" })
	// home
	$('#slogan').prepend('<div class="randomBGHome"></div>');
	$('.randomBGHome').css({ "background-image" : "url(http://www.wattoonline.com/wp-content/themes/watto/images/randomWhite" + (Math.ceil(Math.random()*8)) + ".png)" })
	// headers
	$('#cartIcon').prepend('<div class="randomBGHeader"></div>');
	$('.randomBGHeader').css({ "background-image" : "url(http://www.wattoonline.com/wp-content/themes/watto/images/randomWhite" + (Math.ceil(Math.random()*($numRandoms - 1)) + 1) + ".png)" }) // exclude first random image as it causes redundancy with the logo
	
} // IE	
	
});
