$(document).ready(function() {
	if($().cycle) {
		
	
		if ($('#home_slideshow').length != 0) {
			$('#home_slideshow').cycle({
				fx: 'fade',
				cleartype: true,
				speed: 500,
				timeout: 8000,
				pager: '#pager'
			});
		}
	}

	//some query to match column height on the homepage
	$('#news_listings').css('min-height', $('#home_main_content').height() - 74 + 'px');
	$('#home_sub').css('min-height', $('#home_main').height()  + 'px');
	
	//removes divider from the last element of the nav
	$('#nav ul.nav1>li:last-child').css({
	    'border-right': 'none',
	    'padding-right' : 0
	});

	//removes the subnav if it isn't present
	if ($("#subnav ul li.on").children("ul").length == 0) {
	    $("#subnav_area").remove();
	}
	
	//changes the page width on pages w/o a subnav area
	if ($("#subnav_area").children().size() == 0) {					
	    $("#main_content").css({
			"width": "auto",
	    	"padding-left": "20px",
	    	"padding-right": "20px",
	    	"float": "none"
	    });
	}


});

