if(typeof stribEnvHost=="undefined"){stribEnvHost=""}jQuery(document).ready(function(){starTribune.initFunction();stribMediaRotators.initFunction();equalHeights();increaseFont();decreaseFont();showHideText();if(jQuery("#selectIndices").length>0){setSelectedIndex();jQuery("#selectIndices").change(setSelectedIndex);jQuery("#selecktIndices").keydown(setSelectedIndex);jQuery("#selectIndices").keyup(setSelectedIndex)}tabs();popupopen=false;jQuery(".marketUpdatesCotainer table").find("tbody tr:odd").addClass("odd");jQuery(".totalPollResults").find("tbody tr:first-child td").addClass("noBorder");jQuery(".totalPollResults").find("tbody tr:first-child td").css("padding","0");jQuery(".totalPollResults").find("tbody tr td:first-child").addClass("pollHeader");jQuery(".totalPollResults").find("tbody tr:first-child td:first-child").removeClass("pollHeader");jQuery(".totalPollResults").find("tbody tr:last-child td").addClass("lastCell");jQuery(".totalPollResults").find("tbody tr td:last-child").addClass("noBorder");jQuery(".statsBlock .boxScore table").find("tbody tr td:first-child").css("font-weight","bold");jQuery(".statsBlock .boxScore table").find("tbody tr td:last-child").css("font-weight","bold");jQuery(".statsBlock .boxScore table").find("tbody tr:last-child").addClass("options");jQuery("div.fromTheHomepage").parent().css("margin-bottom","8px");jQuery(".changeLoc").showHide(jQuery(".changeLocation"),jQuery(".changeLocation a"));if(jQuery(".pollForm").length>0){jQuery(".pollForm input[type=image]").validatePoll()}if(jQuery(".CollapsiblePanel1").length){showDirectory()}jQuery(document).click(function(a){if(jQuery(a.target).parents(".blogActions").length==0){jQuery(".shareLayer").slideUp();jQuery(".pollContainer .blogActions").removeAttr("style")}});jQuery(".pollContainer .shareBtn").click(function(){jQuery(".pollContainer .blogActions").css("position","relative")})});jQuery.fn.reverse=[].reverse;function equalHeights(){var a=jQuery(".equalHeight");a.reverse().each(function(c){var d=jQuery(this).children("div");var b=[];d.each(function(e){b.push(parseInt(jQuery(this).css("height")));jQuery(this).css("height",b)});d.each(function(e){jQuery(this).css("height",Math.max.apply(Math,b))})})}var showHide=false;function showHideText(){jQuery(".showHideContent").text("hide");jQuery(".showHideContent").attr({title:"hide"});jQuery(".showHideContent").click(function(){if(showHide==false){jQuery(".showHideContent").html("show");showHide=true;jQuery("#showHideDetails").hide();jQuery(".showHideContent").attr({title:"show"}).removeClass("hideContent");jQuery(".showHideContent").attr({title:"show"}).addClass("showContent")}else{jQuery(".showHideContent").html("hide");showHide=false;jQuery("#showHideDetails").show();jQuery(".showHideContent").attr({title:"hide"}).removeClass("showContent");jQuery(".showHideContent").attr({title:"hide"}).addClass("hideContent")}return false})}var fontAdjCounter=0;var newFontSize=120;function increaseFont(){jQuery(".increaseSize").click(function(){if(newFontSize<140){fontAdjCounter=fontAdjCounter+2;newFontSize=((fontAdjCounter*10)+100);jQuery(".resizeFont").css("font-size",newFontSize+"%")}return false})}function decreaseFont(){jQuery(".reduceSize").click(function(){if(newFontSize>60){fontAdjCounter=fontAdjCounter-2;newFontSize=((fontAdjCounter*10)+100);jQuery(".resizeFont").css("font-size",newFontSize+"%")}return false})}var globalVar={vars:{currentMonth:".eventDate ul li",currentEntertainmentFinder:".entertainMenu ul li",currentRightNewsTabs:".mostReadStoryTab li",currentMainNewsTabs:".tabMenu li",currentScoreBoardTabs:".scoreBoard li",currentEvents:".entertainEventFmly li",currentEntertainmentList:".entertainmentList li",galleryContainer:".latestPhotosGallery .holder ul",currentAdvertiseNewsTabs:".advertiseTab li"}};var starTribune={initFunction:function(){starTribune.entertainmentCalendar();starTribune.entertainmentFinder();starTribune.rightNewsTabs();starTribune.mainNewsTabs();starTribune.scoreBoardTabs();starTribune.advertiseModuleTabs();starTribune.eventFamily();starTribune.entertainmentList();starTribune.datePickerIntializer();starTribune.eventCalendorCategory();starTribune.pollingToogle();starTribune.validationContactUs();starTribune.validationLogin();starTribune.imageColorbox();jQuery(".shareBtn").live("click",starTribune.showShare);starTribune.hideShare();starTribune.registrationControls();starTribune.searchForm();starTribune.mediaBeltAd()},entertainmentCalendar:function(){jQuery(".fullEventCalendar .featuredContent .layoutStoryType1").hide();jQuery(".fullEventCalendar .layoutStoryType1:first").show();jQuery(globalVar.vars.currentMonth+" a:first").addClass("selected");jQuery(globalVar.vars.currentMonth).each(function(a){jQuery(this).children("a").click(function(b){b.preventDefault();jQuery(".fullEventCalendar .featuredContent .layoutStoryType1").hide();jQuery(globalVar.vars.currentMonth+" a").removeClass("selected");jQuery(".fullEventCalendar .featuredContent .layoutStoryType1").eq(a).show();jQuery(this).addClass("selected")})})},entertainmentFinder:function(){jQuery(".eventEntertain .entertainDetails:first").show();jQuery(globalVar.vars.currentEntertainmentFinder+" a:first").addClass("selected");jQuery(globalVar.vars.currentEntertainmentFinder).each(function(a){jQuery(this).children("a").click(function(c){var b=jQuery(this).attr("href");c.preventDefault();jQuery(globalVar.vars.currentEntertainmentFinder+" a").removeClass("selected");jQuery(".eventEntertain .entertainDetails").find("iframe").attr("src",b);jQuery(this).addClass("selected")})})},entertainmentList:function(){jQuery(".headlineBucket .entertainmentContent").hide();jQuery(".headlineBucket .entertainmentContent:first").show();jQuery(globalVar.vars.currentEntertainmentList+" a:first").addClass("selected");jQuery(globalVar.vars.currentEntertainmentList).each(function(a){jQuery(this).children("a").click(function(b){b.preventDefault();jQuery(".headlineBucket .entertainmentContent").hide();jQuery(globalVar.vars.currentEntertainmentList+" a").removeClass("selected");jQuery(".headlineBucket .entertainmentContent").eq(a).show();jQuery(this).addClass("selected")})})},rightNewsTabs:function(){jQuery(".tabContentWraper .mostReadStories").hide();jQuery(".tabContentWraper .mostReadStories:first").show();jQuery(globalVar.vars.currentRightNewsTabs+" a:first").addClass("selected");jQuery(globalVar.vars.currentRightNewsTabs).each(function(a){jQuery(this).children("a").click(function(b){b.preventDefault();jQuery(".tabContentWraper .mostReadStories").hide();jQuery(globalVar.vars.currentRightNewsTabs+" a").removeClass("selected");jQuery(".tabContentWraper .mostReadStories").eq(a).show();jQuery(this).addClass("selected")})})},mainNewsTabs:function(){jQuery(".tabContainer .tabContentDisplay").hide();jQuery(".tabContainer .tabContentDisplay:first").show();jQuery(globalVar.vars.currentMainNewsTabs+" a:first").addClass("selected");jQuery(globalVar.vars.currentMainNewsTabs).each(function(a){jQuery(this).children("a").click(function(b){b.preventDefault();jQuery(".tabContainer .tabContentDisplay").hide();jQuery(globalVar.vars.currentMainNewsTabs+" a").removeClass("selected");jQuery(".tabContainer .tabContentDisplay").eq(a).show();jQuery(this).addClass("selected")})})},scoreBoardTabs:function(){jQuery(".tabContentWraper .indiviualScore").hide();jQuery(".tabContentWraper .indiviualScore:first").show();jQuery(globalVar.vars.currentScoreBoardTabs+" a:first").addClass("selected");jQuery(globalVar.vars.currentScoreBoardTabs).each(function(a){jQuery(this).children("a").click(function(b){b.preventDefault();jQuery(".tabContentWraper .indiviualScore").hide();jQuery(globalVar.vars.currentScoreBoardTabs+" a").removeClass("selected");jQuery(".tabContentWraper .indiviualScore").eq(a).show();jQuery(this).addClass("selected")})})},advertiseModuleTabs:function(){jQuery(".tabContentWraper .advertiseTabContent").hide();jQuery(".tabContentWraper .advertiseTabContent:first").show();jQuery(globalVar.vars.currentAdvertiseNewsTabs+" a:first").addClass("selected");jQuery(globalVar.vars.currentAdvertiseNewsTabs).each(function(a){jQuery(this).children("a").click(function(b){b.preventDefault();jQuery(".tabContentWraper .advertiseTabContent").hide();jQuery(globalVar.vars.currentAdvertiseNewsTabs+" a").removeClass("selected");jQuery(".tabContentWraper .advertiseTabContent").eq(a).show();jQuery(this).addClass("selected")})})},eventFamily:function(){jQuery(".headlineBucket .entertainEventContent").hide();jQuery(".headlineBucket .entertainEventContent:first").show();jQuery(globalVar.vars.currentEvents+" a:first").addClass("selected");jQuery(globalVar.vars.currentEvents).each(function(a){jQuery(this).children("a").click(function(b){b.preventDefault();jQuery(".headlineBucket .entertainEventContent").hide();jQuery(globalVar.vars.currentEvents+" a").removeClass("selected");jQuery(".headlineBucket .entertainEventContent").eq(a).show();jQuery(this).addClass("selected")})})},datePickerIntializer:function(){if(jQuery(".date-pick").length>0){jQuery(".date-pick").datePicker({clickInput:true})}},eventCalendorCategory:function(){jQuery(".eventFinderRight").hide();if(jQuery("#eventCalendarCategory").attr("selectedIndex")!="0"){var a=jQuery("#eventCalendarCategory").attr("selectedIndex")-1;jQuery(".eventFinderRight").eq(a).show()}jQuery("#eventCalendarCategory").change(function(){if(-1===window.location.host.indexOf("www.startribune.com")){jQuery(this).attr("disabled","disabled")}else{if(jQuery("#eventCalendarCategory").attr("selectedIndex")!="0"){jQuery.ajax({type:"GET",url:jQuery(this).val(),dataType:"html",success:function(b){jQuery(".eventFinderRight form").html(b);jQuery(".eventFinderRight").show()}})}else{jQuery(".eventFinderRight").hide();return false}}}).change()},pollingToogle:function(){jQuery(".pollContainer").hide();jQuery(".currentPollContainer").show();jQuery("a.arwRight").click(function(b){b.preventDefault();var a=jQuery(this).attr("class");if(a=="arwRight collapse"){jQuery(this).parents(".pollWrapper").children(".pollContainer").slideDown();jQuery(this).removeClass("collapse");jQuery(this).addClass("expand")}else{if(a=="arwRight expand"){jQuery(this).parents(".pollWrapper").children(".pollContainer").slideUp();jQuery(this).addClass("collapse");jQuery(this).removeClass("expand")}}});jQuery(".showResults").click(function(a){a.preventDefault();jQuery(this).parents(".pollContainer").children(".pollResultContainer").show();jQuery(this).hide()})},validationContactUs:function(){var a=jQuery("#textname");var h=jQuery("#textemailaddress");var b=jQuery("#category");var j=jQuery("#selection");var g=jQuery("#comments");a.blur(f);h.blur(c);b.change(d);j.change(e);g.blur(k);jQuery("form.validationContactUs").submit(function(){if(f()&c()&d()&e()&k()){return true}else{return false}});function f(){if(a.val().length<1){a.addClass("fc-field-error");if(a.parents("li").children("div.fc-error").length<1){a.parents("li").append("<div class='fc-error'><p>Please enter name.</p></div>")}return false}else{a.removeClass("fc-field-error");a.parents("li").children("div.fc-error").remove();return true}}function c(){if(!h.val().match("[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])")){h.addClass("fc-field-error");if(h.parents("li").children("div.fc-error").length<1){h.parents("li").append("<div class='fc-error'><p>Please enter your valid email address.</p></div>")}return false}else{h.removeClass("fc-field-error");h.parents("li").children("div.fc-error").remove();return true}}function d(){if(b.attr("selectedIndex")==0){b.addClass("fc-field-error");if(b.parents("li").children("div.fc-error").length<1){b.parents("li").append("<div class='fc-error'><p>Please select subject.</p></div>")}return false}else{b.removeClass("fc-field-error");b.parents("li").children("div.fc-error").remove();return true}}function e(){if(j.attr("selectedIndex")==0){j.addClass("fc-field-error");if(j.parents("li").children("div.fc-error").length<1){j.parents("li").append("<div class='fc-error'><p>Please select topic.</p></div>")}return false}else{j.removeClass("fc-field-error");j.parents("li").children("div.fc-error").remove();return true}}function k(){if(g.val().length<1){g.addClass("fc-field-error");if(g.parents("li").children("div.fc-error").length<1){g.parents("li").append("<div class='fc-error'><p>Please enter comment.</p></div>")}return false}else{g.removeClass("fc-field-error");g.parents("li").children("div.fc-error").remove();return true}}},validationLogin:function(){var d=jQuery("#another-field");var b=jQuery("#password");d.blur(a);b.blur(c);jQuery("form.validationLogin").submit(function(){if(a()&c()){return true}else{return false}});function a(){if(d.val().length<1){d.addClass("fc-field-error");if(d.parents("li").children("div.fc-error").length<1){d.parents("li").append("<div class='fc-error'><p>Please enter username.</p></div>")}return false}else{d.removeClass("fc-field-error");d.parents("li").children("div.fc-error").remove();return true}}function c(){if(b.val().length<1){b.addClass("fc-field-error");if(b.parents("li").children("div.fc-error").length<1){b.parents("li").append("<div class='fc-error'><p>Please enter password.</p></div>")}return false}else{b.removeClass("fc-field-error");b.parents("li").children("div.fc-error").remove();return true}}},showShare:function(){var a=false;jQuery(".shareLayer",jQuery(this).parents(".blogActions")).slideDown();jQuery(".shareIcons",jQuery(this).parents(".blogActions")).slideDown();jQuery(".showShareUrlIcon",jQuery(this).parents(".blogActions")).addClass("hide");jQuery(".showEmailContent",jQuery(this).parents(".blogActions")).addClass("show");jQuery(".showShareUrlIcon").click(function(){jQuery(".showShareUrlIcon",jQuery(this).parents(".blogActions")).addClass("hide");jQuery(".showShareUrlIcon",jQuery(this).parents(".blogActions")).removeClass("show");jQuery(".showEmailContent",jQuery(this).parents(".blogActions")).addClass("show");jQuery(".showEmailContent",jQuery(this).parents(".blogActions")).removeClass("hide");jQuery(".shareIcons",jQuery(this).parents(".blogActions")).slideDown();jQuery(".emailContent",jQuery(this).parents(".blogActions")).slideUp();return false});jQuery(".showEmailContent").click(function(){jQuery(".showShareUrlIcon",jQuery(this).parents(".blogActions")).addClass("show");jQuery(".showShareUrlIcon",jQuery(this).parents(".blogActions")).removeClass("hide");jQuery(".showEmailContent",jQuery(this).parents(".blogActions")).addClass("hide");jQuery(".showEmailContent",jQuery(this).parents(".blogActions")).removeClass("show");jQuery(".emailContent",jQuery(this).parents(".blogActions")).slideDown();jQuery(".shareIcons",jQuery(this).parents(".blogActions")).slideUp();return false});jQuery(".showCommentArea").click(function(){if(a==false){jQuery("div.commentArea").slideDown();jQuery(".showCommentArea").html("- add a comment");a=true}else{jQuery("div.commentArea").slideUp();jQuery(".showCommentArea").html("+ add a comment");a=false}return false});return false},hideShare:function(){jQuery(".closeWindow a").click(function(){jQuery(".shareLayer",jQuery(this).parents(".blogActions")).slideUp();return false})},imageColorbox:function(){jQuery(".openURL").click(function(){var a;if(jQuery(".galleryLightBoxResponse img").length>0){a=".galleryLightBoxResponse img"}else{if(jQuery(".galleryLightBoxResponseForEnlarge img").length>0){a=".galleryLightBoxResponseForEnlarge img"}}if(a){jQuery(this).colorbox({href:a,inline:true,open:true,title:"&nbsp;"})}});jQuery(".openURLRel").click(function(){jQuery(this).colorbox({maxHeight:"95%",maxWidth:"95%",open:true,title:"&nbsp;"})})},registrationControls:function(){if(null!==window.location.host.match(/\.startribune\.com$/)){if(getCookie("vendor_reg")&&getCookie("vendor_reg").split("|").length<10){var a=getCookie("vendor_reg");a=a+"|";createCookie("vendor_reg",a,300,"startribune.com")}jQuery(".rurl_fix").each(rurl_fix);if(getCookie("startribune_user_auth")){jQuery("#regInfoUserName").html(getCookie("startribune_user_auth").replace(/\|.*/,"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"));jQuery("#regIfnoLoggedIn").css("display","inline");if(readCookie("usersubs")===null){if(Math.random()<0.25){setLoginCookies(true)}}}else{jQuery("#regIfnoLoggedOut").css("display","inline")}}jQuery(".loginLBPopup").click(function(){jQuery.colorbox({inline:true,href:"#loginFormLB"});return false});jQuery("#loginFormLB,.leftColCotainer form[name=LoginForm],.rightColContainer form[name=LoginForm]").submit(function(){var b=jQuery("input[name=username]",jQuery(this));if(-1!==b.val().indexOf("@")&&-1!==b.val().indexOf(".",b.val().indexOf("@"))){b.attr("name","email")}})},searchForm:function(){jQuery(".strib_search_form").submit(function(d){var f=jQuery.trim(jQuery(this).find("[name=stq]").val()),b=60,a=new Date(),c=new Date(a.getFullYear(),a.getMonth(),a.getDate()-0-b);end_date=new Date(a.getFullYear(),a.getMonth(),a.getDate()+1),begin_month=c.getMonth()+1,end_month=end_date.getMonth()+1,searchRange="daterange:"+c.getFullYear()+"-"+begin_month+"-"+c.getDate()+".."+end_date.getFullYear()+"-"+end_month+"-"+end_date.getDate();if(f.length===0){jQuery(this).find("[name=stq]").focus();return false}else{if(f.toLowerCase()==="search the star tribune"){jQuery(this).find("[name=stq]").val("").focus();return false}}jQuery(this).find("[name=dnavs]").val(searchRange);jQuery(this).find("[name=q]").val(f+" "+searchRange);jQuery(this).find("[name=stq]").val("");return true})},mediaBeltAd:function(){if(jQuery("#adcheck").length>0){if(jQuery("#adcheck").height()>=600){jQuery("#fail1 script").remove();jQuery("#fail2").after(jQuery("#fail1"));jQuery("#fail1,#fail2").css("display","block")}else{jQuery("#fail1").css("display","block")}}}};var selectedIndex=jQuery("#selectIndices").val();function updateIndices(a){var b=objConditions[a];var e=jQuery("#indexBar");var d=10;if(a=="maxuv"){d=15}var c=jQuery(e).width()/d;indicator=new Object();indicator.pos=b*c;jQuery("#indexArrow").animate({left:Math.round(indicator.pos)-Math.round(jQuery("#indexArrow").width()/2)});jQuery("#arrowText").html(b)}function setSelectedIndex(b){var a=jQuery("#selectIndices").val();updateIndices(a)}var tabs=function(){var a=jQuery(".tabs");jQuery("a",a).click(function(){var c=jQuery(this).parents(".tabs");var b=jQuery("a",c).index(this);jQuery(c).next().children().hide();jQuery(c).next().children().eq(b).show();jQuery("a",c).parent().removeClass("selected");jQuery(this).parent().addClass("selected");if(jQuery(this).parents(".tabContents").length==0){jQuery(".tabs a",jQuery(c).next().children().eq(b)).eq(0).click()}return false});jQuery("a",a).eq(0).click()};jQuery.fn.showHide=function(a,b){jQuery(this).click(function(){jQuery(a).show();return false});jQuery(b).click(function(){jQuery(a).hide();return false})};jQuery.fn.validatePoll=function(){jQuery(this).click(function(){if(!jQuery("input[type=radio]",jQuery(this).prevAll(".poll").eq(0)).is(":checked")){alert("Please select a poll option.");return false}})};var showDirectory=function(){jQuery(".CollapsiblePanel1 .CollapsiblePanelTab").click(function(){var a=jQuery(this).parent().children(".CollapsiblePanelContent");if(jQuery(this).hasClass("selected")){jQuery(this).removeClass("selected");jQuery(a).slideUp("fast")}else{jQuery(this).addClass("selected");jQuery(a).slideDown("fast")}});jQuery(".CollapsiblePanel1 .CollapsiblePanelTab").hover(function(){jQuery(this).css("text-decoration","underline")},function(){jQuery(this).css("text-decoration","none")})};function setCookie(a,d,b){var e=new Date();e.setDate(e.getDate()+b);var c=escape(d)+((b==null)?"":"; expires="+e.toUTCString());document.cookie=a+"="+c}function getCookie(b){var c,a,e,d=document.cookie.split(";");for(c=0;c<d.length;c++){a=d[c].substr(0,d[c].indexOf("="));e=d[c].substr(d[c].indexOf("=")+1);a=a.replace(/^\s+|\s+jQuery/g,"");if(a==b){return unescape(e)}}}function amountToScroll(a){return"1"}var STInteractiveElementControls=new Array();function registerInteractiveElementControl(a){STInteractiveElementControls.push(a)}function interactiveElementStarted(){cancelRefresh();for(i=0;i<STInteractiveElementControls.length;i++){STInteractiveElementControls[i]()}}function cancelRefresh(){if(typeof(reloadTimer)!="undefined"){window.clearTimeout(reloadTimer)}}function dw_loadExternal(c,e,a,d){e=e||"buffer";a=a||"display";if(window.frames[e]){window.frames[e].location=c;var b=document.getElementById?document.getElementById(a):null;if(b&&d){b.innerHTML="<p>Retrieving data. Please wait ...</p>";b.style.display="block"}return false}return true}function dw_displayExternal(d,a,c){d=d||"buffer";a=a||"display";var b=document.getElementById?document.getElementById(a):null;if(window.frames[d]&&b){b.innerHTML=window.frames[d].document.body.innerHTML;b.style.display="block";if(typeof c=="function"){c()}if(typeof window.frames[d].doOnIframedLoad=="function"){window.frames[d].doOnIframedLoad()}}drawDynamicAds()}var pageAds=[];var pageAdsInProc=null;function reloadAds(a){drawAds()}function drawDynamicAd(b,a){jQuery(b).empty();jQuery(b).writeCapture().html(a)}function drawDynamicAds(){if(pageAdsInProc!=null){adObj=pageAdsInProc.shift();if(adObj){jQuery("#"+adObj.containerName).empty();if(adObj.dartURL==null){var a=document.getElementById(adObj.containerName).src;document.getElementById(adObj.containerName).contentWindow.location.replace(a+"&stCbRndNbr="+stDynOrd);drawDynamicAds()}else{if(adObj.positionType=="dynamicJS"){adCode='<script language="JavaScript" src="'+adObj.dartURL+"?ord="+stDynOrd+'" type="text/javascript"><\/script>';jQuery("#"+adObj.containerName).writeCapture().html(adCode,function(){drawDynamicAds()})}else{if(adObj.positionType=="gam"){dw_loadExternal(adObj.dartURL.adURL,adObj.dartURL.buffer,adObj.dartURL.container)}else{document.getElementById(adObj.containerName).contentWindow.location.replace(adObj.dartURL+"?ord="+stDynOrd+"?");drawDynamicAds()}}}}else{pageAdsInProc=null;jQuery("#adcheckA,#adcheckB").each(function(){if(jQuery(this).height()<29){jQuery(this).css("display","none")}})}}}function drawAds(){if(pageAdsInProc==null){stDynOrd=Math.floor(Math.random()*100000);pageAdsInProc=pageAds.slice(0);drawDynamicAds()}}function registerAdPosition(b,a,c){if(typeof c=="undefined"){c="default"}if(pageAds.length<1){rp=Math.floor(Math.random()*1000000000)}pageAds.push({containerName:b,dartURL:a,positionType:c})}adPositionsToClear=[];function registerAdContainer(a){adPositionsToClear.push(a)}jQuery(document).ready(function(){drawAds()});var stribMediaRotators={initFunction:function(){jQuery.fn.carouFredSel.defaults.items.minimum=1;stribMediaRotators.imageGalleryCarousel();stribMediaRotators.mediaBelt.initFunction();stribMediaRotators.sectionFront.initFunction();stribMediaRotators.sportsGames()},imageGalleryCarousel:function(){if(jQuery("#foo1").length>0){var a=jQuery("#foo1").carouFredSel({circular:true,infinite:false,auto:false,prev:{button:"#foo1_prev",key:"left",items:1},next:{button:"#foo1_next",key:"right",items:1},pagination:"#foo1_pag",scroll:{items:1,speed:10000,pauseDuration:5000,pauseOnHover:true,onBefore:function(e,b,c,d){jQuery(b[0]).trigger("select_for_carousel")}}});jQuery("#foo1 li").bind("select_for_carousel",function(){var f=jQuery(this),c=f.parent().parent().parent().parent().parent().parent(),d=f.attr("title").split("_"),g=f.children(".bigFrame").html(),e=f.children(".bigFrameRealURL:first").html(),b=g;if(!f.hasClass("omniture_tracked")){b+='<img src="http://nandomedia.112.2o7.net/b/ss/nmminneapolis/1/H.20.3--NS/0?pageName='+escape(jQuery(".articleHeader h2:first,.galleryContainer:first h1,.playerName h1,#twinsGameDayModule h1 a").html())+"&server=startribune.com&channel=Photo Gallery&c1="+escape(e)+"&c2=HTML&c3=Photo&c4=Photo Gallery&c5=noscript&c6=&c7="+s.prop7+"&c24=Photo Gallery&c31="+escape(jQuery(".omnitureCategory").html())+"&"+Math.round(new Date().getTime()/1000)+'" alt="">';f.addClass("omniture_tracked")}jQuery(".carouselBigImage",c).html(b);jQuery("#imageCaption",c).html(decodeURIComponent(d[0]));if(d[1]!=""&&d[1]!=undefined&&d[1]!=null){jQuery("#imageAuthor",c).html("Photo: "+d[1])}else{jQuery("#imageAuthor",c).html("")}}).bind("click",function(b){b.preventDefault();jQuery("#foo1").trigger("pause",true);jQuery(this).trigger("select_for_carousel")});a.children(":first").trigger("select_for_carousel");jQuery(document).bind("cbox_complete",function(){jQuery("#foo1").trigger("pause",true)})}},mediaBelt:{initFunction:function(){jQuery("#foo2").carouFredSel({auto:false,circular:false,infinite:false,pagination:"#foo2_pag"});jQuery("ul#foo2 li,a.openGallery").each(stribMediaRotators.mediaBelt.contentColorboxLoader);jQuery('[id$="_cbox"]').click(stribMediaRotators.mediaBelt.contentColorboxLoader)},contentColorboxLoader:function(){jQuery(this).colorbox({href:stribMediaRotators.mediaBelt.buildPopupUrl(jQuery(this).attr("id"),true,false),height:636,width:935,scrolling:false,onComplete:function(){cancelRefresh();if(jQuery("#foo1").hasClass("ajax_carouselme")){stribMediaRotators.imageGalleryCarousel()}else{if(jQuery("#foo1").hasClass("ajax_oneitemtofocus")){jQuery("#foo1 li").children(".bigFrame").children().appendTo(jQuery(".carouselBigImage"))}}jQuery(".showFullScreen").click(stribMediaRotators.mediaBelt.contentColorboxFullScreenLoader);jQuery(".otherContentContainer h3 a").click(stribMediaRotators.mediaBelt.contentColorboxLoader)}})},contentColorboxFullScreenLoader:function(){jQuery(this).colorbox({href:stribMediaRotators.mediaBelt.buildPopupUrl(jQuery(this).attr("id"),true,true),height:645,width:909,scrolling:false,onComplete:function(){cancelRefresh();if(jQuery("#foo1").hasClass("ajax_carouselme")){jQuery(".carouselBigImage").html(jQuery("#foo1 li").eq(0).children(".bigFrame").html());stribMediaRotators.imageGalleryCarousel()}else{if(jQuery("#foo1").hasClass("ajax_oneitemtofocus")){jQuery("#foo1 li").children(".bigFrame").children().appendTo(jQuery(".carouselBigImage"))}}}})},buildPopupUrl:function(g,a,b){var d=g.split("_"),e=d[0],f=d[1],c=d[2];popupUrl="";a=(typeof(a)!="undefined"&&a==false)?false:true,b=(typeof(b)!="undefined"&&b==true)?true:false;return"http://"+window.location.host+"/templates/Photo_Video_Gallery?iid="+escape(e)+"&contentId="+escape(f)+"&sectionId="+escape(c)+"&norb="+(a?"0":"1")+"&fs="+(b?"1":"0")}},sectionFront:{initFunction:function(){if(jQuery(".carouselContent").length>0){jQuery(".carouselThumbContainer .jcarousel-prev").click(stribMediaRotators.sectionFront.previous);jQuery(".carouselThumbContainer .jcarousel-next").click(stribMediaRotators.sectionFront.next);jQuery(".carouselContent .layoutStory").hide();jQuery(".carouselContent .layoutStory").eq(0).addClass("selected").fadeIn();jQuery(".thumbsContainer ul li").eq(0).addClass("selected").hide();jQuery(".thumbsContainer ul li").eq(1).addClass("odd");jQuery(".thumbsContainer ul li").eq(2).addClass("even");jQuery(".thumbsContainer ul li").each(function(a){jQuery(this).data("origIndex",a)});if(jQuery(".carouselThumbContainer .jcarousel-next").length>0){stribMediaRotators.sectionFront.autoAdvance.start()}jQuery(document).bind("cbox_complete",function(){stribMediaRotators.sectionFront.autoAdvance.stop()})}},autoAdvance:{start:function(){stribMediaRotators.sectionFront.autoAdvance.stop();stribMediaRotators.sectionFront.autoAdvance.timer=setTimeout("stribMediaRotators.sectionFront.autoAdvance.advance()",stribMediaRotators.sectionFront.autoAdvance.advanceTime)},stop:function(){if(stribMediaRotators.sectionFront.autoAdvance.timer){clearTimeout(stribMediaRotators.sectionFront.autoAdvance.timer);stribMediaRotators.sectionFront.autoAdvance.timer=null}},advance:function(){stribMediaRotators.sectionFront.next();stribMediaRotators.sectionFront.autoAdvance.start()},advanceTime:7499,timer:null},previousOrNext:function(a){a.preventDefault();if(null!==stribMediaRotators.sectionFront.autoAdvance.timer){stribMediaRotators.sectionFront.autoAdvance.start()}if(jQuery(this).hasClass("odd")){stribMediaRotators.sectionFront.previous()}else{stribMediaRotators.sectionFront.next()}},previous:function(){jQuery(".jcarouselClip li.selected").appendTo(jQuery(".jcarouselClip ul"));jQuery(".jcarouselClip li.odd").addClass("selected").hide().removeClass("odd");jQuery(".jcarouselClip li.even").addClass("odd").removeClass("even");jQuery(".jcarouselClip li:last.selected").removeClass("selected").addClass("even").show();var a=jQuery(".jcarouselClip li.selected").data("origIndex");jQuery(".carouselContent .layoutStory.selected").removeClass("selected").hide();jQuery(".carouselContent .layoutStory").eq(a).addClass("selected").fadeIn()},next:function(){jQuery(".jcarouselClip li.selected").prependTo(jQuery(".jcarouselClip ul"));jQuery(".jcarouselClip li.even").addClass("selected").hide().removeClass("even");jQuery(".jcarouselClip li.odd").addClass("even").removeClass("odd");jQuery(".jcarouselClip li:first.selected").removeClass("selected").addClass("odd").show();var a=jQuery(".jcarouselClip li.selected").data("origIndex");jQuery(".carouselContent .layoutStory.selected").removeClass("selected").hide();jQuery(".carouselContent .layoutStory").eq(a).addClass("selected").fadeIn()}},sportsGames:function(){if(jQuery(".herderSliderList").length>0){jQuery("#herderSlider .previous").click(function(){jQuery(this).next().find("li:last").prependTo(jQuery(this).next().find("ul"))});jQuery("#herderSlider .Next").click(function(){jQuery(this).prev().find("li:first").appendTo(jQuery(this).prev().find("ul"))})}}};var rdb=getCookie("RDB"),publisher=null,version=null,zip=null,zipExt=null,countryCode=null,subscriber=null,incomeHigh=null,incomeLow=null,age=null,gender=null,keyVals="";if(rdb&&rdb!="undefined"){publisher=rdb.substring(0,2);version=rdb.substring(2,4);zip=parseInt(rdb.substring(4,10),16);zipExt=parseInt(rdb.substring(10,14),16);countryCode=parseInt(rdb.substring(14,18),16);subscriber=rdb.substring(20,22);incomeHigh=rdb.substring(22,24);incomeLow=rdb.substring(24,26);age=parseInt(rdb.substring(26,28),16);if(rdb.substring(18,20)=="01"){gender="male"}else{gender="female"}}var keyVals=";zip="+zip+";gndr="+gender;var seg_age=null;if(age>=18&&age<=24){seg_age="18-24"}else{if(age>=25&&age<=34){seg_age="25-34"}else{if(age>=35&&age<=44){seg_age="35-44"}else{if(age>=45&&age<=54){seg_age="45-54"}else{if(age>=55&&age<=64){seg_age="55-64"}else{if(age>64){seg_age="65"}}}}}}if(seg_age){keyVals+=";sage="+seg_age}function readCookie(b){var e=b+"=",a=document.cookie.split(";");for(var d=0;d<a.length;d++){var f=a[d];while(f.charAt(0)===" "){f=f.substring(1,f.length)}if(f.indexOf(e)===0){return f.substring(e.length,f.length)}}return null}function getCookie(a){return readCookie(a)}function GetCookie(a){return unescape(readCookie(a))}function createCookie(c,f,g,e){var b=new Date(),a="",d="";if(g){b.setTime(b.getTime()+(g*24*60*60*1000));a="; expires="+b.toGMTString()}d=c+"="+f+a+"; path=/";if(e){d+="; domain="+e}document.cookie=d}function createCookieS(c,f,g,e){var b=new Date(),a="",d="";if(g){b.setTime(b.getTime()+(g*1000));a="; expires="+b.toGMTString()}var d=c+"="+f+a+"; path=/";if(e){d+="; domain="+e}document.cookie=d}function setCookie(a,b){createCookie(a,b)}function SaveCookie(a,c,d,b){return createCookie(a,c,d,"startribune.com")}function eraseCookie(a,b){if(b){createCookie(a,"",-1,b)}else{createCookie(a,"",-1)}}function setLoginCookies(c){if(c==true){var a=document.getElementsByTagName("head")[0],b=document.createElement("script");b.type="text/javascript";b.src="http://"+stribEnvHost+"www.startribune.com/templates/determineLoginStatus.js?c=n&r="+Math.random();a.appendChild(b)}else{document.write('<script language="javascript" type="text/javascript" src="http://'+stribEnvHost+"www.startribune.com/templates/determineLoginStatus.js?c=n&r="+Math.random()+'"><\/script>')}}function deleteLoginCookies(){eraseCookie("username","startribune.com");eraseCookie("startribune_user_auth","startribune.com");eraseCookie("RDB","startribune.com");eraseCookie("vendor_reg",".startribune.com");eraseCookie("UID","www.startribune.com");eraseCookie("UID","m.startribune.com");eraseCookie("usersubs","startribune.com");eraseCookie("userMLids","startribune.com");return true}if(readCookie("UID")&&!readCookie("username")){setLoginCookies()}function rurl_fix(){var a=window.location.href;if(window.location.pathname.toLowerCase()=="/s"){a=""}if(-1==window.location.host.indexOf("www.startribune.com")){a="http://www.startribune.com/registrationredirect/?redirectURL="+escape(a)}if(this.nodeName=="A"){jQuery(this).attr("href",jQuery(this).attr("href").replace("rurl=","rurl="+escape(a)))}else{if(this.nodeName=="INPUT"){var b=jQuery(this).attr("value");if(b.length==0){jQuery(this).attr("value",a)}else{jQuery(this).attr("value",b.replace("rurl=","rurl="+escape(a)))}}else{if(this.nodeName=="FORM"){jQuery(this).attr("action",jQuery(this).attr("action").replace("rurl=","rurl="+escape(a)))}}}};

