$(document).ready(function(){

	// Makes the shearers specific Button
	$('.shButton').each(function(){
		$(this).html("<div class='btnLeft'></div><div class='btnMiddle'><span>" + $(this).html() + "</span></div><div class='btnRight'></div>");
	});
	
	
	if($('.glLongBottomContainer').length > 1)
	{
		$('.glLongBottomContainer:first').css('margin-bottom', '0');
	}
	
	$('.glLongBottomContainer .bottom:last').css('display', 'none');
	
$('img').ifixpng();

	$('#shNavContainer #shSubNav .left ul li').each(function(){
		$(this).mouseover(function(){
			$(this).css('background', 'url(/images/Shearers/ShearersMS/shSubNav_SPRITE.gif) 0 -56px repeat-x');
		});
		
		if($(this).hasClass('currentTab') == false)
		{
			$(this).mouseout(function(){
				$(this).css('background', 'none');	
			});
		}
	});
	
	$('.ddlMenu').each(function(){
		$(this).parent().mouseover(function(){
			$(this).children('a:first').css('background', 'url(../../../images/Shearers/ShearersMS/shSubNav_SPRITE.gif) 0px 0px no-repeat');
			$(this).children('a:first').find('span').css('background', 'url(../../../images/Shearers/ShearersMS/shSubNav_SPRITE.gif) right -28px no-repeat');
    	});
		$(this).parent().mouseout(function(){
			$(this).children('a:first').css('background', 'none');
			$(this).children('a:first').find('span').css('background', 'none');
			
			$('#shNavContainer #shSubNav ul li.currentTab').css('background', 'url(/images/Shearers/ShearersMS/shSubNav_SPRITE.gif) 0px -56px repeat-x');
			$('#shNavContainer #shSubNav ul li.currentTab a.parentLink').css('background', 'url(/images/Shearers/ShearersMS/shSubNav_SPRITE.gif) 0px 0px no-repeat');
			$('#shNavContainer #shSubNav ul li.currentTab a.parentLink span').css('background', 'url(/images/Shearers/ShearersMS/shSubNav_SPRITE.gif) 100% -28px no-repeat');
		});
	});
	
	
});
