// Javascript specific to the Tor page.

$(document).ready(
	function(){
		
		//$('#carouselMain').load("inc/tor_forge/homepageCarousel.html");
		//$('#carouselMain').load("/HomeCarousel.aspx?publisher=torforge");
		$('a').click(function() {this.blur();});
		//$('#topCarouselWrapper').css('overflow','normal');
		
		//once the carousel is built, take off the overflow hiding which is required for safari to render the rest of the page properly
		$('#topCarouselWrapper div.hideWrapper').css({
			'overflow':'visible',
			'top':'0'
			}
		);
		
		// balance our columns
		balanceColumnsWithFooter("#toursAndEvents,#news");
		balanceColumnsWithFooter("#topSellers,#awardWinners");
		

		$('<pre id="JSH2Outout" />').prependTo('body');
		outstr = "";

		$('h2').each( function(a) {
			//get the identifier
			identifier = ($(this).attr('id')) ? $(this).attr('id') : $(this).parent().attr('id') + " h2";

			
			outstr+= "\n\n#" + identifier + "{\n";
			outstr+= "text-indent:-999px;\n";
			outstr+= "overflow:hidden;\n";
			outstr+= "background: url(../" + $(this).find('img').attr('src') + ") no-repeat center;\n";
			outstr+= "display:block;\n}";
		});

		//$('#JSH2Outout').html(outstr );



	}
);