﻿function setExpanderImage(fileName)
{	
	$('#content-wrapper').css('backgroundImage','url("/assets/images/' + fileName + '")');
}

function clearIE6() 
{ 
	$('#content-wrapper').append('<div style="clear:both;height:0;line-height:0;font-size:0;margin-top:-2px;"></div>'); 
	$('.highlights').append('<div style="clear:both;height:0;line-height:0;font-size:0;margin-top:-2px;"></div>'); 
}

function removeEmptyWidgetBorders()
{
	$('.widget').each(function() 
	{
		if(jQuery.trim($(this).html()) == "") 
		{
			$(this).addClass('no-border');
		}
	});
}

function evenRows()
{
	var sidebarHeight = $('.sidebar').height() - 8; // cause of a border-bottom
	var mainContentHeight = $('.maincontent').height();
	
	if(sidebarHeight>mainContentHeight)
	{
		$('.maincontent').height(sidebarHeight);
		
	}
	
}

$.browser.msie6 = $.browser.msie && /MSIE 6\.0/i.test(window.navigator.userAgent) && !/MSIE 7\.0/i.test(window.navigator.userAgent);

$(function() 
{ 
	if($.browser.msie6) clearIE6();
	if($.browser.msie)
	{
		$('#masthead ul a').css('color','#ccc');
		$('h2').css('color','#555');
	}
	$('#content-wrapper').css('backgroundImage','url("/assets/images/sidebar_expander_1.jpg")');
	removeEmptyWidgetBorders();
	//evenRows();
	
});