$(function() {
	$("#columnMain > table").attr("width" , "100%");
	$("#columnMain > table > table").attr("width" , "100%");

	$('#navMain li').hover(function(){
		$(this).addClass('hover');
	}, function(){
		$(this).removeClass('hover');
	});
	
	// Since the UniteU templating is so awesome, we need to hijack and or add a few elements so we can style things
	$('#mainimg').attr('align', 'center');
	
	$('table.items table tr:first-child td')
		.wrapInner('<div class="listingProductImage"></div>')
		.find('img')
		.attr('valign', 'middle');
	
	$('table.items table tr:last-child')
		.wrapInner('<div class="listingProductTitlePrice"></div>')
		.wrapInner('<div class="listingProductDetails"></div>');
		
	// on the home page the text for the header is a comment, so lets find out if we're looking at the homepage, and if so add a class to it.
	// this is used to hide some extra junk added by the system below the homepage featured items. this is the only way I can find to hide it.
	if( $('h1').html() == '<!--Home Page-->' ){
		$('body').addClass('home');
	}

	
	if(typeof dept_id != 'undefined'){
		if(dept_id < 1000){
			$('table.items').addClass('department');
		}
	}
	

	$('table.department').attr("width", "75%");

	$('table.department tr td')
		.css("border","none")
		.attr("width","35%");
	$('table.department .listingProductImage').css("height", "3em");
	
});