$(function() {
	// channels home control
		$("td.mini:has(ul.PagerList)").siblings("td.miniheader").addClass("nav_wherenexttitle");
		$("td a:has(span.header)").addClass("header");
		$("td a span.header").removeClass("header");
		$("td.dim:contains('Stories ')").addClass("storycount");
		$("td span.minidim:contains('/') ~ br").remove();
		$("td span.minidim:contains('/')").remove();
		$("td:has(a:has(img.homeimg))").each( function() {
			$(this).addClass("channel_story");
			$(this).children("a:has(img.homeimg)").addClass("moveme");
		});
	// channels agro feed
		$(".channels.aggFeedTeaser .action a").text("more");
	// channels story control
		$("a.btnBack").wrapInner("<span/>");
		$("td > div.channelcontent").parent("td").addClass("channel_storycontent");
		$("td a.jumperlink:contains('Return to')").parent("td").addClass("channel_storynav");
		$("td.channel_storycontent .header ~ br, td.channel_storynav br, td.channel_storynav .hdiv17").remove();
		$("td.channel_storynav a.jumperlink").addClass("nav_wherenext");
		$("td.channel_storycontent .channelcontent").insertBefore("a.btnBack");
	// cross-browser support
		// $("dl.crumbs dd, #footer dl.person dd.jobtitle").prepend("- ");
		$("td.channel_storycontent .channelquickfacts dt").append(" - ");
		$("body#page #footer dl.person dd.email").prepend("/ ");
		// Internet Explorer
		if($.browser.msie) {
			//stuff
		};
	// ETC
		$('span:contains("No stories found")').addClass("nostories");
		
});


/* Popup window function
	 @url string
	 @width integer
	 @height integer
*/
function openWindow(url,width,height) {
	var leftPosition = (screen.width - width)/2;
	var topPosition  =  (screen.height - height)/2; 
	
	popupWin = window.open(''+ url +'','popup','location=0,status=0,scrollbars=0,width='+ width +',height='+ height +'');
	popupWin.moveTo(leftPosition,topPosition);	

}


 $(document).ready(function(){
	$(".contentblock tbody tr:odd").addClass("odd");
 });
 

