// Welcome to your jquery.base file ... place awesome jquery stuff here to help spruce up / fix / whatever your site. A link to this file has already been placed in each masterpage

$(function() {
	$("td").removeAttr("nowrap");
	
	// Template 5
	function cropPercent() {
		var newWidth = $(this).width() - 1;
		$(this).width(newWidth);
	}
	if($.browser.msie) {
		$('.multipleskinarea').each(function(){
			var sumColWidths = 0;
			$('.multipleskinarea .base_col').each(function(){
				sumColWidths = sumColWidths + $(this).outerWidth(true);
			});
			// Uncomment to show calculations (pre-adjustment)
			//$(this).prepend("MSCA Width: " + $(this).width() + "px<br />sumColWidths: " + sumColWidths + "px");
			if ($(this).width() < sumColWidths ){
				$(this).children('.base_col').each(cropPercent);
			};
		});
		$('#mainlead').each(function(){
			var sumLeadWidths = 0;
			sumLeadWidths = $('#mainlead .left').outerWidth(true) + $('#mainlead .right').outerWidth(true);
			// Uncomment to show calculations (pre-adjustment)
			//$(this).prepend("MSCA Width: " + $(this).width() + "px<br />sumLeadWidths: " + sumLeadWidths + "px");
			if ($(this).width() < sumLeadWidths ){
				$('#mainlead .left').each(cropPercent);
				$('#mainlead .right').each(cropPercent);
			};
		});
	};
	
	// IE lte 6-specific
	/*if($.browser.msie && $.browser.version<7) {
		// stuff here
	};*/
	
	// add first and last classes to various elements
	/*$("#footer ul, .subnavblock, .footlinksblock").each( function() {
		$(this).children("li:last").addClass("li_last");
		$(this).children("li:first").addClass("li_first");
	});*/
	
});