// Initializes User Scripts:

$(document).ready(function() {

	// Removes the background image (separator gradient) from the last menu item, except if class of li is 'current'.
	$('ul#Menu li:last:not(.current)').css('background-image','none');
	
	
	// Menu hover styles for last menu item.
	//var cssMenuOverObj = {'background-color' : '#fff','background-image' : 'none'}
	//var cssMenuOverObjRevert = {'background-color' : 'transparent','background-image' : 'none'}
	//$('ul#Menu li:last:not(.current) a').hover(function() {
	//	$(this).css(cssMenuOverObj);
	//},
	//function() {
	//	$(this).css(cssMenuOverObjRevert);
	//});
	
	$('ul#subNav li.current').each(function() {
		$(this).parent().parent().addClass('noBold');
	});
	
	$('ul#Menu li a.item').hover(function() {
		$(this).parent().addClass('over');
	},
	function() {
		$(this).parent().removeClass('over');
	});
	
	// Selects text in Search Box when focused:
	$('input.txtSearch').focus(function(){
		this.select();
	});
	
	// Footer Links - pop up in new window / tab:
	$('a#smartzLink').click(function() {
		window.open($(this).attr("href"),'window2', '');
		return false;
	});
	
	$('#Menu').navMenu();
	
	$(".listItemDate").each(function(i) {
		html = '';
		html = $(this).html();
		if ( html != '' ) {
			html = html.replace(/12:00:00 AM/i, "");
			$(this).html(html);
		}
	});
});