var guid=new Array();var sPlayerVcq="";var currVideoIterator=0;function switchContent(t){try{var t=t||{};var b=t.id||"";var k=t.index||"0";var p=t.tagName||"";var h=document.getElementById(b);var c=h.getElementsByTagName(p);var q=document.getElementById(b+"");var n=q.getElementsByTagName("a")||null;
var o=parseInt(k)+1;for(var g=0;g<c.length;g++){var m=c[g];if(m.id==b+"-page"+o){m.className=m.className.replace("selected","");m.className=m.className+" ";}else{m.className=m.className.replace("","");}}for(var f=0;f<n.length;f++){var d=n[f];if(d.className.indexOf("")!=-1){d.className=d.className.split(" ")[0];
}if(f==parseInt(k)){d.parentNode.className=d.parentNode.className+" selected";}else{d.parentNode.className=d.parentNode.className.replace("selected","");}}}catch(l){}}function trim(b){return b.replace(/^\s+|\s+$/g,"");}function onOpacityAnimationComplete(){$(this).css("opacity","default");}var fsMedia=fsMedia||{};
fsMedia.CP=function(b,c){this._xDomElement=$(b).get(0);this._xContentDomElement=$(".content",this._xDomElement).get(0);this._xNavDomElement=$(".nav",this._xDomElement).get(0);this._xTabBarDomElement=$(".tab-bar",this._xDomElement).get(0);this._xTabContainerDomElement=$(".tab-container",this._xDomElement).get(0);
this._xFlyoutDomElement=$(".info-flyout",this._xDomElement).get(0);this._iFlyoutWidth=-parseInt($(this._xFlyoutDomElement).css("right"));this._xFlyoutThumbnailDomElement=$(".thumbnail",this._xFlyoutDomElement).get(0);this._xFlyoutDescriptorDomElement=$(".descriptor",this._xFlyoutDomElement).get(0);this._xFlyoutHeadlineDomElement=$(".headline",this._xFlyoutDomElement).get(0);
this._xFlyoutBlurbDomElement=$(".blurb",this._xFlyoutDomElement).get(0);this._xInfoDomElement=$(".info",this._xDomElement).get(0);this._xInfoContentDomElement=$(".content",this._xInfoDomElement).get(0);this._xInfoBlurbDomElement=$(".blurb",this._xInfoContentDomElement).get(0);this._xInfoMainHeadlineDomElement=$(".main-headline",this._xInfoContentDomElement).get(0);
this._xInfoRelatedDomElement=$(".related",this._xInfoDomElement).get(0);this._xInfoRelatedHeadlinesDomElement=$(".headlines",this._xInfoRelatedDomElement).get(0);if($(this._xDomElement).attr("id")==""){$(this._xDomElement).attr("id","fs-cp-"+Math.floor(Math.random()*10000000));}this._sDomElementId=$(this._xDomElement).attr("id");
this._axItems=c;this._iItemCount=c.length;this.init();};

fsMedia.CP.TYPE_DEFAULT=0;
fsMedia.CP.TYPE_FALLBACK=1;
fsMedia.CP.TYPE_WAR=2;
fsMedia.CP.LOAD_INDICATOR_OPACITY=0.7;
fsMedia.CP.PLAY_INDICATOR_OPACITY=0.85;
fsMedia.CP.PLAY_INDICATOR_BACKDROP_OPACITY=0.2;
fsMedia.CP.INFO_OPACITY=0.9;
fsMedia.CP.TAB_BAR_TIME_MS=200;
fsMedia.CP.AUTO_ROTATION_TIMER_MS=7000;
fsMedia.CP.FLYOUT_DELAY_MS=500;
fsMedia.CP.FLYOUT_TIME_MS=300;
fsMedia.CP.INFO_TIME_MS=250;
fsMedia.CP.IMAGE_FADEOUT_TIME_MS=250;
fsMedia.CP.LOAD_INDICATOR_TIME_MS=250;
fsMedia.CP.PLAY_INDICATOR_TIME_MS=600;
fsMedia.CP.ITEM_SWITCH_WAIT_MS=250;
fsMedia.CP.ITEM_SPORTS_DESCRIPTOR_NONE="none";

var xActiveIndexData="";fsMedia.CP.prototype={_xDomElement:null,_xContentDomElement:null,_xNavDomElement:null,_xTabBarDomElement:null,_xTabContainerDomElement:null,_xFlyoutDomElement:null,_iFlyoutWidth:0,_xFlyoutThumbnailDomElement:null,_xFlyoutDescriptorDomElement:null,_xFlyoutHeadlineDomElement:null,_xFlyoutBlurbDomElement:null,_xInfoDomElement:null,_xInfoContentDomElement:null,_xInfoMainHeadlineDomElement:null,_xInfoBlurbDomElement:null,_xInfoRelatedDomElement:null,_xInfoRelatedHeadlinesDomElement:null,_sDomElementId:null,_iAutoRotationTimerId:0,_axImages:null,_axThumbs:null,_axImageDomElements:null,_axItems:null,_iItemCount:0,_iCurrentItemIndex:-1,init:function(){var b=this;
this._axImages=[];this._axThumbs=[];this._axImageDomElements=[];this._iActiveImageDomElementIndex=0;var d;for(var c=0;c<2;c++){d=$("<a />").addClass("image").css("opacity",0);$(this._xContentDomElement).append(d);this._axImageDomElements.push(d);}this._xPlayerContainerDomElement=$("<div />").addClass("player").attr("id",this._sDomElementId+"_player_p");
$(this._xContentDomElement).append(this._xPlayerContainerDomElement);this._xLoadIndicatorDomElement=$("<div />").addClass("load-indicator").css("opacity",0);$(this._xLoadIndicatorDomElement).css("");$(this._xContentDomElement).append(this._xLoadIndicatorDomElement);this._xPlayIndicatorDomElement=$("<div />").addClass("play-indicator").css("opacity",0);

var f=this;$(this._xPlayIndicatorDomElement).append($("<span />").addClass("backdrop").css("opacity",fsMedia.CP.PLAY_INDICATOR_BACKDROP_OPACITY).bind("click",(function(j){return function(){fsAnalytics(this,{type:"link",description:"centerpiece"+j._axItems[j._iCurrentItemIndex].headline+" - slide "+(j._iCurrentItemIndex+1)});
};})(f)));$(this._xPlayIndicatorDomElement).append($("<a />").addClass("icon").bind("click",(function(j){return function(){fsAnalytics(this,{type:"link",description:"centerpiece"+j._axItems[j._iCurrentItemIndex].headline+" - slide "+(j._iCurrentItemIndex+1)});};})(f)));$(this._xContentDomElement).append(this._xPlayIndicatorDomElement);
this._axTabDomElements=[];if(this._iItemCount>1){this._xTabBarDomElement.onselectstart=function(){return false;};this._xTabBarDomElement.onmousedown=function(){return false;};var e;for(var c=0;c<this._iItemCount;c++){e=$("<div />").addClass("tab").data("index",c).text(c+1);$(this._xTabContainerDomElement).append(e);
this._axTabDomElements.push(e);}$(this._xTabBarDomElement).css("marginTop",-Math.round($(this._xTabBarDomElement).height()*0.5)).css("top","50%");var h=new Image();var g=$(b._xTabContainerDomElement).css("backgroundImage");g=g.substr(4,g.length-5);$(h).load(function(){$(b._xTabBarDomElement).animate({right:0},fsMedia.CP.TAB_BAR_TIME_MS);
}).error(function(){$(b._xTabBarDomElement).animate({right:0},fsMedia.CP.TAB_BAR_TIME_MS);}).attr("src",g);this.startAutoRotation();}$(this._xDomElement).hover(function(j){if(b._iAutoRotationTimerId){b.stopAutoRotation();}},function(j){if((b._xPlayerContainerDomElement).hasClass("active")){return;}b.startAutoRotation();
});$(this._xNavDomElement).hover(function(j){},function(j){b.showFlyout(false);});$(this._axTabDomElements).each(function(){$(this).hover(function(){if(b.getType()!=fsMedia.CP.TYPE_FALLBACK&&b.getType()!=fsMedia.CP.TYPE_DEFAULT){b.showInfo(false);}b.killFlyoutDelay();if(!$(this).hasClass("selected")){$(this).addClass("hover");

var j=$(this).data("index");b.iFlyoutTimerId=setTimeout(function(){b.previewItem(j);},b._bIsFlyoutOpen?0:fsMedia.CP.FLYOUT_DELAY_MS);}else{b.showFlyout(false);}},function(){b.killFlyoutDelay();$(this).removeClass("hover");});});$(this._xDomElement).click(function(k){var j=k.target;if($(j).hasClass("tab")){if(!b.getMutex()){b.setMutex(fsMedia.CP.ITEM_SWITCH_WAIT_MS);
b.killFlyoutDelay();b.selectItem($(j).data("index"));}}else{if($(j).hasClass("info-flyout")||$(j).parents(".info-flyout").size()>0){if(!b.getMutex()){b.setMutex(fsMedia.CP.ITEM_SWITCH_WAIT_MS);b.killFlyoutDelay();b.selectItem($(".info-flyout").data("index"));}}}});this.selectItem(0);},setType:function(b){switch(b){case fsMedia.CP.TYPE_FALLBACK:this._iType=fsMedia.CP.TYPE_FALLBACK;
$(this._xDomElement).attr("class","bho-cp fallback");break;case fsMedia.CP.TYPE_WAR:this._iType=fsMedia.CP.TYPE_WAR;$(this._xDomElement).attr("class","bho-cp fallback");$(this._xDomElement.parentNode).attr("class","bho-page-center-piece");break;case fsMedia.CP.TYPE_DEFAULT:default:this._iType=fsMedia.CP.TYPE_DEFAULT;
$(this._xDomElement).attr("class","fs-cp default");break;}},getType:function(){return this._iType;},selectItem:function(d){if(d==this._iCurrentItemIndex){return;}var b=this;if($(this._xPlayerContainerDomElement).hasClass("active")){$(this._xPlayerContainerDomElement).removeClass("active");}if($(this._xPlayerContainerDomElement).html()!=""){$(this._xPlayerContainerDomElement).html("");
}this.stopVideo();if(this._axTabDomElements&&this._axTabDomElements.length){$(this._axTabDomElements[d]).addClass("selected").removeClass("hover").siblings(".tab").removeClass("selected");}b.showLoadIndicator();this.loadImage(d,c);function c(h){b._iCurrentItemIndex=h;b.setType(b._axItems[h].type);b.setInfo(h,true);
if(b._axItems[h].type==fsMedia.CP.TYPE_FALLBACK){b.showInfo(true);}else{if(b._axItems[h].related!=undefined){b.showInfo(true);}else{b.showInfo(false);}}if(h==-1){b.showLoadIndicator(false);}else{b.showLoadIndicator(false);var e=b._axImageDomElements[b._iActiveImageDomElementIndex];var g=b._axImageDomElements[1-b._iActiveImageDomElementIndex];
$("#cp-flash-embed").stop().css("zIndex",0);$(e).stop().css("zIndex",0).unbind().attr("href","");if(b._axItems[h].swfUrl&&b._axItems[h].swfUrl!=""){$("#cp-flash-embed").remove();$(e).css("opacity",0);$(g).after('<div id="cp-flash-embed"></div>');b._axItems[h].swfUrl=trim(unescape(b._axItems[h].swfUrl));
b._axItems[h].flashWidth=trim(unescape(b._axItems[h].flashWidth));b._axItems[h].flashHeight=trim(unescape(b._axItems[h].flashHeight));b._axItems[h].flashVars=trim(unescape(b._axItems[h].flashVars));var f=$(".fs-cp a.image:first").outerHeight(true);var l=$(".fs-cp a.image:first").outerWidth(true);if(b._axItems[h].type==fsMedia.CP.TYPE_FALLBACK){l-=$(".fs-cp div.info").outerWidth(true);
}else{f-=$(".fs-cp div.info").outerHeight(true);}launchMyFlash({locId:"cp-flash-embed",contUrl:b._axItems[h].swfUrl,width:l,height:f,flashVars:b._axItems[h].flashVars});$("#cp-flash-embed").css("top","0px").css("zIndex",10).css("opacity",1);}else{$("#cp-flash-embed").attr("id","").animate({opacity:0,top:"200%"},fsMedia.CP.IMAGE_FADEOUT_TIME_MS*2,function(){$(this).remove();
});$(e).animate({opacity:0,top:"200%"},fsMedia.CP.IMAGE_FADEOUT_TIME_MS*2);$(g).stop().css("background","url('"+$(b._axImages[h]).attr("src")+"') no-repeat").css("top","-100%").css("zIndex",10).attr("title",fsEscapeHTML(unescape(b._axItems[h].headline))).bind("click",(function(m){return function(){fsAnalytics(this,{type:"link",description:"centerpiece - "+m._axItems[h].headline+" - slide "+(h+1)});
};})(b)).animate({opacity:1,top:0},fsMedia.CP.IMAGE_FADEOUT_TIME_MS);}var k=b._axItems[h].videoId;sPlayerVcq="";if(b._axItems[h].playerQuery!=""){sPlayerVcq=unescape(b._axItems[h].playerQuery);}else{if(b._axItems[h].playerVcq!=""){sPlayerVcq=unescape(b._axItems[h].playerVcq);}}sPlayerVcq=sPlayerVcq.replace(/&amp;/gi,"&");
if(sPlayerVcq!=""){getGuid(sPlayerVcq);}if(k||sPlayerVcq!=""){setTimeout(function(){b.showPlayIndicator(true,false,k,sPlayerVcq);},fsMedia.CP.IMAGE_FADEOUT_TIME_MS);}else{b.showPlayIndicator(false,true);var j=unescape(b._axItems[h].url);j=j.replace(/&amp;/gi,"&");$(g).attr("href",j);}b._iActiveImageDomElementIndex=1-b._iActiveImageDomElementIndex;
}}},showInfo:function(b,d){if(b==undefined){b=true;}if(b){var c=this.getType();switch(c){case fsMedia.CP.TYPE_FALLBACK:$(this._xInfoDomElement).css("display","block");$(this._xInfoDomElement).stop().animate({opacity:1},fsMedia.CP.INFO_TIME_MS,null,onOpacityAnimationComplete);break;case fsMedia.CP.TYPE_WAR:$(this._xInfoDomElement).css("display",$(this._xInfoRelatedDomElement).css("display"));
$(this._xInfoDomElement).stop().animate({bottom:0,opacity:fsMedia.CP.INFO_OPACITY},fsMedia.CP.INFO_TIME_MS,null,onOpacityAnimationComplete);break;case fsMedia.CP.TYPE_DEFAULT:default:$(this._xInfoDomElement).css("display",$(this._xInfoRelatedDomElement).css("display"));$(this._xInfoDomElement).stop().animate({bottom:0,opacity:fsMedia.CP.INFO_OPACITY},fsMedia.CP.INFO_TIME_MS,null,onOpacityAnimationComplete);
break;}}else{var c=this.getType();switch(c){case fsMedia.CP.TYPE_FALLBACK:$(this._xInfoDomElement).stop().animate({opacity:0},d?0:fsMedia.CP.INFO_TIME_MS,null,onOpacityAnimationComplete);break;case fsMedia.CP.TYPE_WAR:$(this._xInfoDomElement).stop().animate({bottom:-60,opacity:0},d?0:fsMedia.CP.INFO_TIME_MS,null,onOpacityAnimationComplete);
break;case fsMedia.CP.TYPE_DEFAULT:default:$(this._xInfoDomElement).stop().animate({bottom:-45,opacity:0},d?0:fsMedia.CP.INFO_TIME_MS,null,onOpacityAnimationComplete);break;}}},setInfo:function(j,k){if(k){$(this._xInfoContentDomElement).stop().css("opacity",0);}var m=this._axItems[j];$(this._xInfoMainHeadlineDomElement).html(unescape(m.headline));
$(this._xInfoBlurbDomElement).html(unescape(m.blurb));$(this._xInfoRelatedHeadlinesDomElement).empty();var l=m.related;if(l&&l.length){var d;var h;var e;var g;var b;var c;c=l.length;if(m.type!=fsMedia.CP.TYPE_FALLBACK&&l.length>2){c=2;}for(var f=0;f<c;f++){d=l[f];h=$("<h4 />").addClass("headline");xAnchorDomElement=$("<a />").attr("href",unescape(d.url)).attr("title",fsEscapeHTML(unescape(d.headline))).html(unescape(d.headline)).bind("click",(function(n){return function(){fsAnalytics(this,{type:"link",description:"centerpiece - "+n.headline+" - slide "+(j+1)+" - related"});
};})(d));$(h).append(xAnchorDomElement);if(d.iconType){e=$("<img />").addClass("icon "+d.iconType).attr("src",".").attr("alt",unescape(d.iconTitle)).attr("border","0");if(d.iconUrl){g=$("<a />").attr("href",unescape(d.url)).attr("title",unescape(d.iconTitle));$(g).append(e);b=g;
}else{b=e;}$(h).append($("<span />").text(" ")).append(b);}$(this._xInfoRelatedHeadlinesDomElement).append(h);}$(this._xInfoRelatedDomElement).css("display","block");}else{$(this._xInfoRelatedDomElement).css("display","none");}if(k){$(this._xInfoContentDomElement).animate({opacity:1},fsMedia.CP.INFO_TIME_MS,null,onOpacityAnimationComplete);
}},previewItem:function(c){if(!this._bIsFlyoutOpen){this.showFlyout();}var d=this._axItems[c];$(".info-flyout").data("index",c);if(!this._axThumbs[c]){var b=new Image();$(b).attr("src",d.thumbUrl);this._axThumbs[c]=b;}$(this._xFlyoutThumbnailDomElement).css("backgroundImage","url('"+unescape(d.thumbUrl)+"')");
$(this._xFlyoutDescriptorDomElement).removeClass().addClass("descriptor "+d.sportsDescriptor);$(this._xFlyoutHeadlineDomElement).html(unescape(d.headline));$(this._xFlyoutBlurbDomElement).html(unescape(d.blurb));},showFlyout:function(b){if(b==undefined){b=true;}this._bIsFlyoutOpen=b;if(b){$(this._xFlyoutDomElement).stop().animate({right:0},fsMedia.CP.FLYOUT_TIME_MS);
}else{$(this._xFlyoutDomElement).stop().animate({right:-this._iFlyoutWidth},fsMedia.CP.FLYOUT_TIME_MS);}},killFlyoutDelay:function(){if(this.iFlyoutTimerId){clearTimeout(this.iFlyoutTimerId);this.iFlyoutTimerId=0;}},showPlayIndicator:function(c,f,e,d){if(c==undefined){c=true;}var b=this;if(c){$(this._xPlayIndicatorDomElement).click(function(){b.playVideo(e,d);
b.showPlayIndicator(false,true);});$(this._xPlayIndicatorDomElement).stop().css("display","block").animate({opacity:fsMedia.CP.PLAY_INDICATOR_OPACITY},fsMedia.CP.PLAY_INDICATOR_TIME_MS);}else{$(this._xPlayIndicatorDomElement).unbind();if(f){$(this._xPlayIndicatorDomElement).stop().animate({opacity:0},fsMedia.CP.LOAD_INDICATOR_TIME_MS);
setTimeout(function(){$(b._xPlayIndicatorDomElement).css("display","none");},fsMedia.CP.LOAD_INDICATOR_TIME_MS);}else{$(this._xPlayIndicatorDomElement).stop().css("opacity",0).css("display","none");}}},showLoadIndicator:function(c){if(c==undefined){c=true;}var b=this;if(c){$(this._xLoadIndicatorDomElement).stop().css("display","block").animate({opacity:fsMedia.CP.LOAD_INDICATOR_OPACITY},fsMedia.CP.LOAD_INDICATOR_TIME_MS);
this.showPlayIndicator(false,true);}else{$(this._xLoadIndicatorDomElement).stop().animate({opacity:0},fsMedia.CP.LOAD_INDICATOR_TIME_MS);setTimeout(function(){$(b._xLoadIndicatorDomElement).css("display","none");},fsMedia.CP.LOAD_INDICATOR_TIME_MS);}},loadImage:function(c,e){var b=this;var d=this._axImages[c];
if(d){e.apply(this,[c]);return;}$(this._xLastImage).unbind();d=new Image();this._xLastImage=d;if(this._axItems[c].imageUrl==""&&this._axItems[c].swfUrl!=undefined&&this._axItems[c].swfUrl!=""){this._axItems[c].imageUrl="../../images/spacer.gif";}$(d).load(function(){$(this).unbind();b._axImages[c]=d;if(e){e.apply(this,[c]);
}}).error(function(){$(this).unbind();if(e){e.apply(this,[c]);}}).attr("src",unescape(this._axItems[c].imageUrl));},startAutoRotation:function(){if(this._iAutoRotationTimerId){return;}this._iAutoRotationTimerId=setTimeout(b,fsMedia.CP.AUTO_ROTATION_TIMER_MS);var c=this;function b(){c.selectItem(c._iCurrentItemIndex>=c._axItems.length-1?0:c._iCurrentItemIndex+1);
c._iAutoRotationTimerId=setTimeout(arguments.callee,fsMedia.CP.AUTO_ROTATION_TIMER_MS);}},stopAutoRotation:function(){if(this._iAutoRotationTimerId){clearTimeout(this._iAutoRotationTimerId);this._iAutoRotationTimerId=0;}},playVideo:function(e,d){if(!$(this._sDomElementId+"_player_flash").length){var b="";
if(fsGeneral.category!=undefined){b+="_"+fsGeneral.category.toLowerCase();}currVideoIterator=0;Msn.Video.createWidget(this._sDomElementId+"_player_p","Player",550,350,{"configCsid":"","configName":"video_player","player.defaultVidId":e,"player.c":"v","player.v":e,"player.fr":b,"player.ad":"false"},this._sDomElementId+"_player_flash");
$(this._xPlayerContainerDomElement).addClass("active");}else{var c=this;c.stopAutoRotation();$(this._xPlayerContainerDomElement).addClass("active");}},stopVideo:function(){if($("#"+this._sDomElementId+"_player_flash").length){document.getElementById(this._sDomElementId+"_player_flash").vidPause();}},setMutex:function(b){var c=this;
this._iMutex=setTimeout(function(){c._iMutex=0;},b);},getMutex:function(){return this._iMutex;}};function launchCP(options){var options=options||{};cpFinalSet="";var cpDataString="";var cpRelated="";var related="";var cpFinal="";cpSection="";var cpData=document.getElementById("cp-data").childNodes;if(fsCPHold!=true){var layover=document.getElementById("fs-cp-layover");
layover.innerHTML="";for(i=0;i<cpData.length;i++){if(cpData[i].nodeType==1){cpDataLi=cpData[i].getElementsByTagName("li");for(a=0;a<cpDataLi.length;a++){cpSection=cpDataLi[a].className.replace("cp-data-","");if(cpSection.search("related")==-1){if(cpSection=="type"||cpSection=="sportsDescriptor"){cpDataString+=cpSection+": "+cpDataLi[a].innerHTML+", ";
}else{cpDataString+=cpSection+': "'+escape(cpDataLi[a].innerHTML)+'", ';}}else{if(cpDataLi[a].className=="cp-data-related"){cpDataString+="related: [";cpRelatedDataSet=cpDataLi[a].childNodes;for(r=0;r<cpRelatedDataSet.length;r++){if(cpRelatedDataSet[r].nodeType==1){cpRelatedDataSetRows=cpRelatedDataSet[r].getElementsByTagName("li");
cpRelated+="{";for(s=0;s<cpRelatedDataSetRows.length;s++){cpRelatedDataSetRow=cpRelatedDataSetRows[s];cpSection=cpRelatedDataSetRow.className.replace("cp-data-related-","");if(cpSection=="iconType"){if(cpRelatedDataSetRow.innerHTML=="golf live"){cpRelated+=cpSection+': "follow", ';}else{cpRelated+=cpSection+': "'+cpRelatedDataSetRow.innerHTML+'", ';
}}else{cpRelated+=cpSection+': "'+escape(cpRelatedDataSetRow.innerHTML)+'", ';}}cpRelated=cpRelated.substr(0,cpRelated.length-2);cpRelated+="}, ";}}cpRelated=cpRelated.substr(0,cpRelated.length-2);cpDataString+=cpRelated+"]},";cpRelated="";}}}cpDataString=cpDataString.substr(0,cpDataString.length-2);
cpFinal+="{"+cpDataString+"}, ";cpDataString="";}cpFinalSet=cpFinal.substr(0,cpFinal.length-2);}eval('new fsMedia.CP(".fs-cp",['+cpFinalSet+"])");}else{fsCPHold=false;}}fsMedia.Interactive=function(c){var b=this;this._sPollUrl="/be/fs-interactive-poll-return.xml";this._xDomElement=c;this._iNumPages=3;
this._iCurrentPageIndex=0;this._xPageList=$(".page-list-container",this._xDomElement).children();this._xPaginatorList=$(".tab-selector-list",this._xDomElement).children(".tab-list-item");var d=0;$(this._xPaginatorList).each(function(){$(this).data("_iIndex",d);d++;});this._xCurrentPage=$(this._xPageList)[this._iCurrentPageIndex];
$(c).bind("click",function(e){b.handleClick(e.target);});};fsMedia.Interactive.prototype={_xDomElement:null,_sPollUrl:null,_iNumPages:null,_iCurrentPageIndex:null,_iCurrentPage:null,_iPageWidth:null,_xPageList:null,_xPaginatorList:null};function fsEscapeHTML(f){try{var d=document.createElement("textarea");
d.innerHTML=f;return d.value;d.parentNode.removeChild(d);}catch(c){document.getElementById("htmlconverter").innerHTML='<textarea id="innerConverter">'+f+"</textarea>";var b=document.getElementById("innerConverter").value;document.getElementById("htmlconverter").innerHTML="";return b;}}function addCommas(c){c+="";
x=c.split(".");x1=x[0];x2=x.length>1?"."+x[1]:"";var b=/(\d+)(\d{3})/;while(b.test(x1)){x1=x1.replace(b,"$1"+","+"$2");}return x1+x2;}fsMedia.Interactive.prototype.handleClick=function(h){var k=this;if($(h).hasClass("tab-link")){var e=$(h).parent();var f=$(e).data("_iIndex");if(this._iCurrentPageIndex!=f){var j=$(this._xPaginatorList)[this._iCurrentPageIndex];

var b=$(this._xPaginatorList)[f];$(j).removeClass("");$(b).addClass("");var c=$(this._xPageList)[this._iCurrentPageIndex];var g=$(this._xPageList)[f];$(c).removeClass("");$(c).css("");if($.browser.msie){$(g).addClass("");$(g).css("");}else{$(g).fadeIn(200,function(){$(this).addClass("");
});}this._xCurrentPage=g;this._iCurrentPageIndex=f;}}if($(h).hasClass("")||$(h).parent().parent().children("").hasClass("")){if($(h).hasClass("")){var d=$(h).val();}else{if($(h).hasClass("")){var d=$(h).parent().parent().children("").val();
}}$.get(this._sPollUrl,{fsPollId:d},function(m){$(k._xCurrentPage).children("").remove();var l=$("<ul />").addClass("");$(m).children().find("").each(function(){var q=$("<li />").addClass("");var p=$("<div />").addClass("");var o=$("<div />").addClass("").css("width",$(this).attr("decimal")*$(k._xCurrentPage).width()+"px");
var t=$("<div />").addClass("").html(parseInt($(this).attr("decimal")*100)+"%");var u=$("<div />").addClass("").html($(this).text());$(p).append(o).append(t);$(q).append(p).append(u);$(l).append(q);});$(k._xCurrentPage).append(l);var n=$("<div />").addClass("").html("Total Votes: "+addCommas($(m).children().find("").attr("")));
$(k._xCurrentPage).append(n);});}};var fsCPHold;var cpInstanceCounter=1;function runOverCP(options){var options=options||{};var func=options.func||"";var killAfter=options.killAfter;var instances=options.instances||1;var cookieName=options.cookieName||"";var layover=document.getElementById("fs-cp-layover");

var cpInstance=checkCookie(cookieName,0).split("=");var cpUserInstance=parseFloat(cpInstance[1]);if(cpInstance!=""){if(cpUserInstance==instances){return;}else{setCookie(cookieName,(cpUserInstance+1),1);}}else{setCookie(cookieName,cpInstanceCounter,1);}fsCPHold=true;if(func){eval(func);if(killAfter){setTimeout("launchCP()",killAfter);
return;}return;}}var widgetFrameworkLoadedListeners=new Array();var widgetFrameworkLoaded=false;function AddWidgetFrameworkListener(b){if(widgetFrameworkLoaded){b();}else{widgetFrameworkLoadedListeners.push(b);}}function MsnVideoInitialize2(){widgetFrameworkLoaded=true;for(var b=0;b<widgetFrameworkLoadedListeners.length;
b++){widgetFrameworkLoadedListeners[b]();}}function getGuid(c){var d="";var b="";d=""+c;b=null;if(window.XMLHttpRequest){b=new XMLHttpRequest();}else{if(window.ActiveXObject){b=new ActiveXObject("Microsoft.XMLHTTP");}}if(b!=null){b.open("GET",d,true);b.onreadystatechange=function(){if(b.readyState==4){if(b.status==200){videoData=b.responseXML.documentElement;
var e=videoData.getElementsByTagName("video");guid=[];for(var f=0;f<e.length;f++){guid[f]=e[f].getElementsByTagName("uuid")[0].childNodes[0].nodeValue;}}else{}}};b.send(null);}else{alert("Your browser does not support XMLHTTP.");}}function onPlaylistStatusChanged(){addToPlaylistUuid(guid[currVideoIterator]);
currVideoIterator=currVideoIterator+1;}function addToPlaylistUuid(b){MsnVideo2.sendMessage({type:"addToPlaylist",param:{uuid:b}});}AddWidgetFrameworkListener(function(){MsnVideo2.addMessageReceiver({eventType:"playlistCompleted",widgetId:null,widgetGroup:null,funcCb:onPlaylistStatusChanged});});
