if(window.jQuery)
{
$(function(){
// set Title font to white - overrides cellstyle
$('td.boxout_header_middle').css({'color':'#ffffff','font-size':'18px'});
//
// adjust padding soe search 
if(window.ActiveXObject)
{ 
	$('input#searchString').css({'padding-top':'4px'})
}
else
{ 
	$('input#searchString').css({'padding-top':'1px'})
};
//
// replace menu separator
//
$('div.t_separator').html('<img src="/Images/Content/1341/313463.gif" />');
$('td.t_horizontal > div.t').css({'padding-top':'0px'});
$('td.t_horizontal').css({'padding-right':'0px','padding-top':'0px'}).find('> div.t_separator').css({'position': 'relative', 'top' : '0px'});
//
// Remove top items from drop-downs
//
var tr,cn,chk;
// Change 1 to 3 to leave home menu alone
for(var n=1; n < 30; n+=2)
{
if((chk = $('#bm_' + n)).length != 0 && chk.find('div:first').text().toLowerCase() == 'my area') continue;
if((tr = $('#bm_' + n + '_1')).length) tr.css('display', 'none');
$('#bm_' + n + '_2 td.t_separator_horizontal:eq(n == 1 ? 1 : 0)').closest('tr').css('display', 'none'); // Not strictly needed
if(chk.find('tr').length < (n == 1 ? 2 : 3)) chk.find('div:eq(1)').remove();
}

// Force column width to be narrow throughout in grid if it contains an image (useful in search results)
$('tr.GridItemRow, tr.altGridItemRow').find('td:first-child > a > img').closest('td').attr('width', '20').css('padding-top', '5px');
// Remove speaker icon
$('table.bottomseparator').find('tr.GridItemRow, tr.altGridItemRow, tr.GridItemrow, tr.altGridItemrow').find('td:first-child > a > img').remove();
// More padding
$('table#ArticleGrid').find('tr.GridItemRow, tr.altGridItemRow').find('> td:nth-child(1)').css('padding-left', '10px').has('img').css('padding-left', 0);

// Adjust spacing on listings of recordings
$('table.topseparator').find('table').andSelf().attr('cellpadding', '0');
$('table.topseparator').find('tr.GridItemrow, tr.altGridItemrow').closest('td').css('padding', '8px 0');
$('table.topseparator table.bottomseparator').closest('td').css('padding-top', '3px');
$('table#EventGrid, table#ArticleGrid').attr('border', 0);
//
// S3slider jquery plugin for slideshow
//
if($('#slider').length) $('#slider').s3Slider({timeout:6000,fadeTime:1500});
//
});
}
