
jQuery.fn.styledSelect=function(a){a=jQuery.extend({selectClass:"styledSelect",openSelectClass:"open",optionClass:"option",selectedOptionClass:"selected",closedOptionClass:"closed",firstOptionClass:"first",lastOptionClass:"last",zIndexApply:false,zIndexStart:250,closedHeight:0,openHeight:0},a);var b=a.zIndexStart;this.each(function(){var g=jQuery(this);var f=jQuery("<div></div>").attr("class",a.selectClass);if(a.zIndexApply){f.css("z-index",b-2);}var c=jQuery("<ul></ul>");if(a.zIndexApply){c.css("z-index",b-1);}f.append(c);g.hide(0).after(f);f=g.next();jQuery("option",g).each(function(){if(jQuery(this).attr("value")==undefined){jQuery(this).attr("value",jQuery(this).text());}});var h=function(){var k=jQuery("ul",f);var j=jQuery(":selected",g);k.html("");if(a.closedHeight){k.height(a.closedHeight);}d(g.val(),j.text(),e,j.attr("class"));f.removeClass(a.openSelectClass);jQuery("ul li",f).removeClass(a.selectedOptionClass).removeClass(a.optionClass).addClass(a.closedOptionClass);};var e=function(j){var k=jQuery("ul",f);k.empty();if(a.openHeight){k.height(a.openHeight);}jQuery("option",g).each(function(l){d(jQuery(this).val(),jQuery(this).text(),i,jQuery(this).attr("class"));});f.addClass(a.openSelectClass);jQuery("li:first-child",k).addClass(a.firstOptionClass);jQuery("li:last-child",k).addClass(a.lastOptionClass);j.cancelBubble=true;if(j.stopPropagation){j.stopPropagation();}};var i=function(){var j=jQuery(this).attr("rel");g.val(j);g.change();h();};var d=function(l,n,k,j){var m=jQuery("<li></li>").attr("rel",l).text(n).click(k).addClass(a.optionClass);if(j){m.addClass(j);}if(a.zIndexApply){m.css("z-index",b);}if(g.val()==l){m.addClass(a.selectedOptionClass);}jQuery("ul",f).append(m);};h();g.change(h);b-=3;$(document).click(h);});return this;};$(document).ready(function(){try{var f=$("div#editionSelector");if(f.length==0){f=$("div#editions");}var b=$("#editionSelect");var d=f.offset();var a=null;b.styledSelect({closedHeight:21,openHeight:101,selectClass:"styled-edition",zIndexApply:true});b.change(function(){self.location.href="/"+$(this).val();});a=$("div.styled-edition ul");a.css("position","absolute");if($.browser.safari){a.css("top",d.top+$("body").css("margin-top")+"px");}else{a.css("top",d.top+"px");}}catch(c){}});$(document).ready(function(){var a=function(b){return b.substring(b.lastIndexOf("-")+1);};$("#nav ul:first-child li a.parent").each(function(){var b=a(this.id);$("#menu-children-"+b+" li").click(function(){self.location.href=document.getElementById(this.id+"-a").href;});$("#menu-"+b).hover(function(){try{var c=a(this.id);var g=$(this).offset();var d=$("#menu-children-"+c);if(d.css("left")=="0px"){d.css("left",(g.left+2)+"px");d.css("top",(g.top+$(this).outerHeight())+"px");}d.show();}catch(f){alert("rollover exception: "+f);}},function(){$("#menu-children-"+a(this.id)).hide();});});});$(document).ready(function(){$("a[rel = external]").attr("target","_blank");});function google_ad_request_done(b){var a="";if(b.length==0){$("#googleAdwordsModule").remove();return;}a+='<div class="ads-by-google"><a href="'+google_info.feedback_url+'">Ads by <strong>Google</strong></a></div>';for(var c=0;c<b.length;++c){a+='<div class="ad"><div class="title"><a href="'+b[c].url+'" target="_blank">'+b[c].line1+'</a></div><div class="description">'+b[c].line2+'</div><div class="description">'+b[c].line3+'</div><div class="url"><a href="'+b[c].url+'" target="_blank">'+b[c].visible_url+"</a></div></div>";}$("#googleAdwordsModule").html(a);}$(document).ready(function(){$("img").bind("contextmenu",function(a){return false;});});var FlashReplace={elmToReplace:null,flashIsInstalled:null,defaultFlashVersion:7,replace:function(e,a,d,c,p,n,g){this.elmToReplace=document.getElementById(e);this.flashIsInstalled=this.checkForFlash(n||this.defaultFlashVersion);if(this.elmToReplace&&this.flashIsInstalled){var j="<object"+((window.ActiveXObject)?' id="'+d+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" data="'+a+'"':"");j+=' width="'+c+'"';j+=' height="'+p+'"';j+=">";var f="<param";f+=' name="movie"';f+=' value="'+a+'"';f+=">";f+="";var o="";var b="";for(var h in g){o+='<param name="'+h+'" value="'+g[h]+'">';b+=" "+h+'="'+g[h]+'"';}var m='<embed id="'+d+'" src="'+a+'" type="application/x-shockwave-flash" width="'+c+'" height="'+p+'"';var l=b+"></embed>";var k="</object>";this.elmToReplace.innerHTML=j+f+o+m+l+k;}},checkForFlash:function(a){this.flashIsInstalled=false;var b;if(window.ActiveXObject){try{b=new ActiveXObject(("ShockwaveFlash.ShockwaveFlash."+a));this.flashIsInstalled=true;}catch(d){}}else{if(navigator.plugins&&navigator.mimeTypes.length>0){b=navigator.plugins["Shockwave Flash"];if(b){var c=navigator.plugins["Shockwave Flash"].description.replace(/.*\s(\d+\.\d+).*/,"$1");if(c>=a){this.flashIsInstalled=true;}}}}return this.flashIsInstalled;}};var Goal=Goal||function(){var h={supportWebSocket:(window.WebSocket)?true:false,edition:self.location.pathname.replace(new RegExp("^/([^/]+).*$"),"$1")};var i=function(){return $("meta[name=environment]").length?false:true;};var d=function(k,j){return"/"+h.edition+"/"+k+"/"+j;};var g=function(k,j){window.open(j,k);};var a=function(){if(typeof(console)=="object"&&!i()){console.log(arguments);}};var f=function(){return{getPageTracker:function(){return window.pageTracker;}};}();var b=function(){return{set:function(l,n,m,o,j,p){var k=escape(l)+"="+escape(n);k+=(m?"; EXPIRES="+m.toGMTString():"");k+=(o?"; PATH="+o:"");k+=(j?"; DOMAIN="+j:"");k+=(p?"; SECURE":"");document.cookie=k;},get:function(l){if(!document.cookie){return null;}var m=null;var j=document.cookie.split((escape(l)+"="));if(j.length>=2){var k=j[1].split(";");m=unescape(k[0]);}return m;},remove:function(j){var k=this.get(j);if(k){this.set(j,k,(new Date(1)));}}};}();var e=function(j,k){return Math.round(j*Math.pow(10,k))/Math.pow(10,k);};return{env:h,uri:d,Google:f,openWindow:g,roundNumber:e,isProduction:i,debug:a,popup:null,response:null,form:null,loading:null,helper:{getLinkParam:function c(j){return decodeURI((RegExp(j+"=(.+?)(&|$)").exec(location.search)||[,null])[1]);}},action:null};}();$(document).ready(function(){Goal.form.connect();$("a.popup").live("click",function(){var c=$(this);var b=c.attr("size").split(";");Goal.popup.load(c.attr("href"),c.attr("selector"),this,{size:{width:b[0],height:b[1]}});return false;});$("a.popup_action").live("click",function(){var b=$(this);Goal.action.execute(b);return false;});var a=Goal.helper.getLinkParam("jsa");if(a=="Goal.Twitter.showRegisterPopup"){Goal.twitter.showRegisterPopup();}if(a=="Goal.Facebook.showRegisterPopup"){Goal.facebook.showRegisterPopup();}});Goal.popup=function(){var d={position:{left:0,top:0},size:{width:300,height:"auto"},direction_left:true};var c=function(i,g,h,k){var f=a();var e;var j=$.extend(d,k);if(j.position.left||j.position.top){e=j.position;}else{e=$(h).position();}if(j.direction_left){e.left=e.left-j.size.width;}if(f.css("display")=="block"){f.animate({width:j.size.width});}else{f.css({left:e.left,top:e.top,display:"block"}).animate({width:j.size.width});}Goal.loading.show(f);$(".goal_popup_content",f).load(i+" "+g,function(){$(this).show();Goal.loading.hide();});};var b=function(j,g,i){var f=a();var e;var h=$.extend(d,i);if(h.position.left||h.position.top){e=h.position;}else{e=$(g).position();}if(g){f.css({left:e.left,top:e.top,display:"block"}).animate({width:h.size.width,height:h.size.height});}$(".goal_popup_content",f).html(j).show();};var a=function(){if($("#goal_popup").length==0){var f='<div id="goal_popup" class="goal_popup" ><div class="goal_shadow_container" ><a href="#" class="goal_popup_close" ></a><div class="goal_popup_content" ></div></div></div>';if(false){f='<div class="goal_popup_shadow" >'+f+"</div>";}$("body").append(f);$(".goal_popup_close",$("#goal_popup")).click(function(){$("#goal_popup").hide();});}var e=$("#goal_popup");$(".goal_popup_content",e).hide();return e;};return{load:c,html:b};}();Goal.action=function(){var a=function(b){Goal.loading.show(b.closest(".goal_shadow_container").parent());$.ajax({url:b.attr("href"),type:"POST",dataType:"json",success:function(c){Goal.response.check(c);if(c.type!="redirect"){Goal.loading.hide();}},error:function(){alert("Unexpected exception, Please try again later");Goal.loading.hide();}});return false;};return{execute:a};}();Goal.response={check:function(b){var a=true;switch(b.type){case"error":Goal.popup.html(b.message);a=false;break;case"popup":Goal.popup.html(b.message);a=false;break;case"redirect":if(b.message!=""){window.location.href=b.message;}return false;case"info":$("#response_info").html(b.message);return false;break;}return a;}};Goal.form={connect:function(){$("form.auto_ajax").live("submit",function(){var b=$(this);Goal.loading.show(b.closest(".goal_shadow_container").parent());var a=b.serialize();$.ajax({url:b.attr("action"),type:"POST",dataType:"json",data:a,success:function(c){$(".error_field").remove();if(Goal.response.check(c)){for(error in c.errors){if(c.errors[error]!=""){$("*[name="+error+"]",b).after('<h5 class="error_field" >'+c.errors[error]+"</h5>");}}}if(c.type!="redirect"){Goal.loading.hide();}},error:function(){alert("Unexpected exception, Please try again later");Goal.loading.hide();}});return false;});}};Goal.loading={show:function(b){var a=$('<div id="goal_shadow" style="top:0;left:0;opacity:0.7;z-index:1000; width:100%;height:100%;position:absolute;" > <img style="margin:auto;display:block;margin-top:-10px;" src="/images/default/ajax-loader.gif" alt="loading" /></div>');$(".goal_shadow_container",b).children().css("opacity","0.5");$(".goal_shadow_container",b).css({position:"relative",width:"100%",height:"100%"}).append(a);},hide:function(){$("#goal_shadow").closest(".goal_shadow_container").children().css("opacity","1");$("#goal_shadow").remove();}};Goal.twitter=function(){var a=function(){Goal.popup.load("/"+Goal.env.edition+"/account/view-twitter","#view-twitter",$("#goal_account_menu .popup").first(),{size:{width:600}});};return{showRegisterPopup:a};}();Goal.facebook=function(){var a=function(){Goal.popup.load("/"+Goal.env.edition+"/account/view-facebook","#view-facebook",$("#goal_account_menu .popup").first(),{size:{width:600}});};return{showRegisterPopup:a};}();Goal.twitter=function(){var a=function(){Goal.popup.load("/"+Goal.env.edition+"/account/view-twitter","#view-twitter",$("#goal_account_menu .popup").first(),{size:{width:600}});};return{showRegisterPopup:a};}();Goal.facebook=function(){var a=function(){Goal.popup.load("/"+Goal.env.edition+"/account/view-facebook","#view-facebook",$("#goal_account_menu .popup").first(),{size:{width:600}});};return{showRegisterPopup:a};}();var G_w=null;function BettingWidget(k){try{var s=k;var f=null;var x=null;var n=null;var l=null;var d=null;var a=0;var h=null;var b=null;var c=null;var o=null;var t=1;var p=null;var q=1;var w=null;var r=null;var g=null;var m=null;var v=null;var j=null;this.allOffers=null;this.className="BettingWidget";this.imageBase=null;this.lastImageClass=null;this.loadCompetitionOffersFromPage=function(){try{if(G_BettingWidgetResponse.rC==0){bw_alertMsg("Server request failed: "+G_BettingWidgetResponse.message);bw_shutdown();return;}this.initData(G_BettingWidgetResponse.data);this.initUI();this.startClick();}catch(y){bw_alertMsg("load competition offers from page: "+y);bw_shutdown();}};this.initData=function(C){try{x=Array();h=Array();var E=null;for(var z=0;z<C.comps.length;z++){x.push(C.comps[z]);for(var A=0;A<C.comps[z].matches.length;A++){var F=C.comps[z].matches[A];for(var B=0;B<F.offers.length;B++){var y=F.offers[B];if(($.inArray(y.id,h))==-1){h.push(y.id);}}}}h=h.sort(function(G,e){return(G-e);});b=Array();c=Array();o=Array();$.each(C.bookies,function(G,e){b["b_"+e.code]=e.iconClass;c["b_"+e.code]=e.link;o["b_"+e.code]=e.promoInfo;});j=Array();}catch(D){bw_alertMsg("init data"+D);}};}catch(u){bw_alertMsg(u);}this.addCompetition=function(e){x.push(e);return(x[x.length-1]);};this.appendOffers=function(z){try{if(z.rC==1){if(z.data.comps[0].id!=TB_BettingWidget.COALESCED_COMP_ID){throw ("Wrong competition ID - expected 9999");}var B=this.getCompetitions();var y=null;var G=null;for(var A=0;A<B.length;A++){if(B[A].id==TB_BettingWidget.COALESCED_COMP_ID){G=B[A];y=A;break;}}var E=(G!=null)?G.matches.length:0;y=(y==null)?B.length:y;for(var A=0;A<z.data.comps[0].matches.length;A++){var F=z.data.comps[0].matches[A];var C=Array();C.compId=z.data.comps[0].id;C.gsmmatchid=F.id;C.addressString=y+","+E++;this.allOffers.push(C);if(G!=null){G.matches.push(F);}}if(G==null){G=this.addCompetition(z.data.comps[0]);}$.each(z.data.bookies,function(H,e){if(b["b_"+e.code]==undefined){b["b_"+e.code]=e.iconClass;c["b_"+e.code]=e.link;o["b_"+e.code]=e.promoInfo;}});return true;}}catch(D){bw_alertMsg("Append offers exception "+D);return false;}};this.selectCompetition=function(y,A){try{f=y;this.buildMatchSelector();if(A){this.forceMatchSelect(0);}else{if(!(this.userIsDriving())){if(v[1]!=null){this.forceMatchSelect(v[1]);}}}}catch(z){bw_alertMsg("select competition "+z);}};this.selectMatch=function(E,D){try{var B=this.getSelectedBookieId();d=E;this.buildBookieSelector();if(D){this.forceBookieSelect(0);}else{if(this.userIsDriving()){var A=this.getSelectedMatch();var y=0;for(var z=0;z<A.offers.length;z++){if(A.offers[z].id==B){y=z;break;}}this.forceBookieSelect(y);}else{if(v[2]!=null){this.forceBookieSelect(v[2]);}}}}catch(C){bw_alertMsg("select match "+C);}};this.selectBookie=function(z,B){try{var y=this.getSelectedMatch();n=z;l=y.offers[n].id;this.registerImpression();}catch(A){bw_alertMsg(A+" b index is "+z);}};this.getSelectedBookieIndex=function(){return n;};this.getSelectedBookieId=function(){return l;};this.getBookieIds=function(){return h;};this.getBookieIconClass=function(A){var z="b_"+A;try{var y=b[z];return y;}catch(B){return null;}};this.getBookieLink=function(A){var z="b_"+A;try{var y=c[z];return y;}catch(B){return null;}};this.getBookiePromotionalArray=function(A){var z="b_"+A;try{var y=o[z];return y;}catch(B){return null;}};this.getHomeTeamLogo=function(){try{var A=this.getSelectedMatch();if(A==null){return null;}var y=j["g_"+A.id].homelogo;if(y==undefined){return null;}return y;}catch(z){return null;}};this.getAwayTeamLogo=function(){try{var A=this.getSelectedMatch();if(A==null){return null;}var y=j["g_"+A.id].awaylogo;if(y==undefined){return null;}return y;}catch(z){return null;}};this.getGoalStartTime=function(){try{var A=this.getSelectedMatch();if(A==null){return null;}var z=j["g_"+A.id].goaldate;if(z==undefined){return null;}return z;}catch(y){return null;}};this.userIsDriving=function(){return q;};this.setUserDriving=function(e){q=e;};this.hasNotStarted=function(){return t;};this.setStarted=function(){t=0;};this.getCompetitions=function(){return x;};this.selectPrevPartner=function(){try{if(n==0){var y=this.getSelectedMatch();n=y.offers.length;}this.forceBookieSelect(parseInt(n)-1);}catch(z){bw_alertMsg(z);}};this.selectNextPartner=function(){try{var y=this.getSelectedMatch();if(n==(y.offers.length-1)){n=-1;}this.forceBookieSelect(parseInt(n)+1);}catch(z){bw_alertMsg(z);}};this.startCycling=function(){if(p!=null){clearTimeout(p);}this.buildOffersArray();this.bookieCounter=0;this.debug=(this.querySt("dbgFlag")=="yes")?true:false;this.randomSalt=Math.floor(Math.random()*99);if(this.debug){console.log("Random Salt:"+this.randomSalt);}this.tick();};this.keepCycling=function(){if(p!=null){clearTimeout(p);}p=setTimeout("G_w.tick()",5000);};this.stopCycling=function(){if(p!=null){clearTimeout(p);}p=null;};this.resumeCycling=function(){if(p!=null){clearTimeout(p);}p=setTimeout("G_w.tick()",1000);};this.querySt=function(e){hu=window.location.search.substring(1);gy=hu.split("&");for(i=0;i<gy.length;i++){ft=gy[i].split("=");if(ft[0]==e){return ft[1];}}};this.forceNavigationChain=function(y){try{m=y;v=y.split(",");w=x[v[0]].id;r=x[v[0]].matches[v[1]].id;g=x[v[0]].matches[v[1]].offers[v[2]].id;this.forceCompetitionSelect(v[0]);}catch(z){bw_alertMsg(z);}};}BettingWidget.prototype.getClassname=function(){return this.className;};BettingWidget.K_REPEAT_BOOKIES=1;BettingWidget.K_REPEAT_MATCHES=2;HP_BettingWidget.prototype=new BettingWidget();MP_BettingWidget.prototype=new HP_BettingWidget();TB_BettingWidget.prototype=new MP_BettingWidget();TB_MP_BettingWidget.prototype=new TB_BettingWidget();function HP_BettingWidget(a,b){BettingWidget.call(this,a);this.div=b;this.className="HP_BettingWidget";}function MP_BettingWidget(a,b){HP_BettingWidget.call(this,a);this.div=b;this.className="MP_BettingWidget";}function TB_BettingWidget(a,b){MP_BettingWidget.call(this,a);this.div=b;this.className="TB_BettingWidget";}function TB_MP_BettingWidget(a,b){TB_BettingWidget.call(this,a);this.div=b;this.className="TB_MP_BettingWidget";}HP_BettingWidget.prototype.activeMatch=null;HP_BettingWidget.prototype.activeOffer=null;TB_BettingWidget.prototype.offerPointer=-1;HP_BettingWidget.prototype.initUI=function(){this.buildCompetitionSelector();var d=$("#leagueSelect option");G_w.selectCompetition($(d[0]).attr("value"),true);$("#leagueSelect").change(function(e){if(!(G_w.userIsDriving())){G_w.stopClick();}G_w.selectCompetition(this.value,true);});$("#leagueSelect").mousedown(function(e){if(!(G_w.userIsDriving())){G_w.stopClick();}});$("#matchSelect").change(function(e){if(!(G_w.userIsDriving())){G_w.stopClick();}G_w.selectMatch(this.value,false);});$("#matchSelect").mousedown(function(e){if(!(G_w.userIsDriving())){G_w.stopClick();}});$("#bwPrevPartner").click(function(e){if(!(G_w.userIsDriving())){G_w.stopClick();}e.preventDefault();G_w.selectPrevPartner();});$("#bwNextPartner").click(function(e){if(!(G_w.userIsDriving())){G_w.stopClick();}e.preventDefault();G_w.selectNextPartner();});$("#bwPlay").click(function(e){e.preventDefault();e.stopPropagation();G_w.startClick();});$("#bwStop").click(function(e){e.preventDefault();e.stopPropagation();G_w.stopClick();});$("div#bwSpinners ul").remove();var b="<ul>";var c=G_w.getBookieIds();for(var a=0;a<c.length;a++){b+="<li><a href=''><div class='bullet' bid='"+c[a]+"' >";b+="</div></a></li>";}b+="</ul>";$("div#bwSpinners").attr("innerHTML",b);$("#bwSpinners a").click(function(e){e.preventDefault();e.stopPropagation();if(!(G_w.userIsDriving())){G_w.stopClick();}G_w.spinnerClick(e.currentTarget);});};TB_BettingWidget.prototype.initUI=function(){TB_BettingWidget.chunksDone=G_BettingWidgetResponse.data.isLastChunk;TB_BettingWidget.chunk=1;var b=G_w.getCompetitions();for(var a=0;a<b.length;a++){if(b[a].id==TB_BettingWidget.COALESCED_COMP_ID){TB_BettingWidget.chunk=2;break;}}this.oddsButtonSavedString=null;$("#bwPrevPartner").click(function(c){if(!(G_w.userIsDriving())){G_w.stopClick();}c.preventDefault();G_w.selectPrevOffer();});$("#bwNextPartner").click(function(c){if(!(G_w.userIsDriving())){G_w.stopClick();}c.preventDefault();G_w.selectNextOffer();});$("#bwCloseBtn").click(function(c){c.preventDefault();c.stopPropagation();G_w.stopCycling();$("#bettingWidgetAnchor").fadeOut(1000);});$("#bwPlay").click(function(c){c.preventDefault();c.stopPropagation();G_w.startClick();});$("#bwStop").click(function(c){c.preventDefault();c.stopPropagation();G_w.stopClick();});$(".bwOddsBtn").mouseenter(function(c){try{G_w.stopClick();if(G_w.oddsButtonSavedString==null){G_w.oddsButtonSavedString=$("a",this).attr("innerHTML");var d=$("#bw_betNow").attr("innerHTML");$("a",this).attr("innerHTML",$("#bw_betNow").attr("innerHTML"));}}catch(f){bw_alertMsg("odds button mouse enter exception "+f);}});$(".bwOddsBtn").mouseleave(function(c){try{G_w.startClick();$("a",this).attr("innerHTML",G_w.oddsButtonSavedString);G_w.oddsButtonSavedString=null;}catch(d){bw_alertMsg("odds button mouse leave exception "+d);}});$("#bwNextPartner").mouseenter(function(c){try{var d=$("#bwNextPartner img").attr("src");var g=bw_replaceImage(d,"right_nav_hover.png");$("#bwNextPartner img").attr("src",g);}catch(f){bw_alertMsg("image swap exception "+f);}});$("#bwNextPartner").mouseleave(function(c){try{var d=$("#bwNextPartner img").attr("src");var g=bw_replaceImage(d,"right_nav.png");$("#bwNextPartner img").attr("src",g);}catch(f){bw_alertMsg("image swap exception "+f);}});$("#bwPrevPartner").mouseenter(function(c){try{if($("#bwPrevPartner").hasClass("disabled")){return;}var d=$("#bwPrevPartner img").attr("src");var g=bw_replaceImage(d,"left_nav_hover.png");$("#bwPrevPartner img").attr("src",g);}catch(f){bw_alertMsg("image swap exception "+f);}});$("#bwPrevPartner").mouseleave(function(c){try{var d=$("#bwPrevPartner img").attr("src");var g=null;if($("#bwPrevPartner").hasClass("disabled")){g=bw_replaceImage(d,"left_nav_disabled.png");}else{g=bw_replaceImage(d,"left_nav.png");}$("#bwPrevPartner img").attr("src",g);}catch(f){bw_alertMsg("image swap exception "+f);}});$("#bwCloseBtn").mouseenter(function(c){try{var d=$("#bwCloseBtn img").attr("src");var g=bw_replaceImage(d,"close_btn_hover.png");$("#bwCloseBtn img").attr("src",g);}catch(f){bw_alertMsg("image swap exception "+f);}});$("#bwCloseBtn").mouseleave(function(c){try{var d=$("#bwCloseBtn img").attr("src");var g=bw_replaceImage(d,"close_btn.png");$("#bwCloseBtn img").attr("src",g);}catch(f){bw_alertMsg("image swap exception "+f);}});$("#bwPlay").mouseenter(function(c){try{var d=$("#bwPlay img").attr("src");var g=bw_replaceImage(d,"btn_play_hover.png");$("#bwPlay img").attr("src",g);}catch(f){bw_alertMsg("image swap exception "+f);}});$("#bwPlay").mouseleave(function(c){try{var d=$("#bwPlay img").attr("src");var g=bw_replaceImage(d,"btn_play.png");$("#bwPlay img").attr("src",g);}catch(f){bw_alertMsg("image swap exception "+f);}});$("#bwStop").mouseenter(function(c){try{var d=$("#bwStop img").attr("src");var g=bw_replaceImage(d,"btn_pause_hover.png");$("#bwStop img").attr("src",g);}catch(f){bw_alertMsg("image swap exception "+f);}});$("#bwStop").mouseleave(function(c){try{var d=$("#bwStop img").attr("src");var g=bw_replaceImage(d,"btn_pause.png");$("#bwStop img").attr("src",g);}catch(f){bw_alertMsg("image swap exception "+f);}});$("#bw_betSelect").change(function(c){G_w.stopClick();G_w.buildOfferSelector();});$("#bettingWidgetAnchor").fadeIn();};HP_BettingWidget.prototype.buildCompetitionSelector=function(){var c=this.getCompetitions();var b="";for(var a=0;a<c.length;a++){b+="<option value='"+c[a].id+"' >"+c[a].name+"</option> ";}$("#leagueSelect").append(b);};HP_BettingWidget.prototype.buildMatchSelector=function(){$("#matchSelect option").remove();var b=this.getSelectedCompetition();var c="";for(var a=0;a<b.matches.length;a++){c+="<option value='"+b.matches[a].id+"' >"+b.matches[a].matchname+"</option> ";}$("#matchSelect").append(c);};TB_BettingWidget.prototype.buildMatchSelector=function(){return;};HP_BettingWidget.prototype.buildBookieSelector=function(){try{var a=this.getSelectedMatch();var h=this.getHomeTeamLogo();var b=this.getAwayTeamLogo();$("#bwMatchTitle").attr("innerHTML",a.matchname);var d=this.getGoalStartTime();$("#bwMatchTime").attr("innerHTML",(d!=null)?d:a.starttime);$("#bwT1Name").attr("innerHTML",a.hometeam);var g=$("#bwT1Logo img");if(h==null){if(g.length>0){$(g[0]).remove();}}else{if(g.length==0){$("#bwT1Logo").append("<img src='"+h+"' ></img>");}else{$(g[0]).attr("src",h);}}$("#bwT2Name").attr("innerHTML",a.awayteam);g=$("#bwT2Logo img");if(b==null){if(g.length>0){$(g[0]).remove();}}else{if(g.length==0){$("#bwT2Logo").append("<img src='"+b+"' ></img>");}else{$(g[0]).attr("src",b);}}var a=this.getSelectedMatch();var c=(a.offers.length>0);$("#bwPrevPartner .leftArrow").each(function(j,e){$(e).addClass("inactive");});$("#bwNextPartner .rightArrow").each(function(j,e){if(c){$(e).removeClass("inactive");}else{$(e).addClass("inactive");}});this.resetSpinnerLEDs();}catch(f){bw_alertMsg("Home page build partner select ex "+f);}};TB_BettingWidget.prototype.buildBookieSelector=function(){return;};HP_BettingWidget.prototype.buildOfferSelector=function(){var c=this.getSelectedMatch();var d=this.getSelectedBookieIndex();var f=c.offers[d];$("#bT1WOdds").attr("innerHTML",denom+(Math.round(betFactor*parseFloat(f.homeOdds)*100))/100);$("#bT1WOdds").attr("href",f.homeOfferLink);$("#bT1WOdds").attr("rel","nofollow");$("#bwDrawBetNow").attr("innerHTML",f.drawOdds);$("#bwDrawBetNow").attr("href",f.drawOfferLink);$("#bwDrawBetNow").attr("rel","nofollow");$("#bT2WOdds").attr("innerHTML",f.awayOdds);$("#bT2WOdds").attr("href",f.awayOfferLink);$("#bT2WOdds").attr("rel","nofollow");var b=self.location.pathname.replace(new RegExp("^/([^/]+).*$"),"$1");var e=G_w.getSelectedMatch();var a="/"+b+"/betting/odds-comparison/matchGid/"+e.id;$("#bwMoreBetLink").attr("href",a);};TB_BettingWidget.prototype.buildOfferSelector=function(){try{var d=this.getSelectedMatch();var j=this.getSelectedBookieIndex();var c=d.offers[j];var h=trim($("#bwDrawBetNow").attr("innerHTML"));var m=h.lastIndexOf("&nbsp;");if(m==-1){m=h.length;}h=h.substr(0,m);var a=$("#bw_betSelect").val();var f=$("#bw_denomination").attr("innerHTML");$("#bT1WOdds").attr("innerHTML",d.hometeam+"&nbsp;"+f+pad((Math.round(a*parseFloat(c.homeOdds)*100)/100)+""));$("#bT1WOdds").attr("href",c.homeOfferLink);$("#bT1WOdds").attr("rel","nofollow");$("#bwDrawBetNow").attr("innerHTML",h+"&nbsp;"+f+pad((Math.round(a*parseFloat(c.drawOdds)*100)/100)+""));$("#bwDrawBetNow").attr("href",c.drawOfferLink);$("#bwDrawBetNow").attr("rel","nofollow");$("#bT2WOdds").attr("innerHTML",d.awayteam+"&nbsp;"+f+pad((Math.round(a*parseFloat(c.awayOdds)*100)/100)+""));$("#bT2WOdds").attr("href",c.awayOfferLink);$("#bT2WOdds").attr("rel","nofollow");var b=self.location.pathname.replace(new RegExp("^/([^/]+).*$"),"$1");var k=G_w.getSelectedMatch();var l="/"+b+"/betting/odds-comparison/matchGid/"+k.id;$("#bwMoreBetLink").attr("href",l);}catch(g){bw_alertMsg("Tool bar build offer selector ex "+g);}};HP_BettingWidget.prototype.getSelectedCompetition=function(){var b=$("#leagueSelect").attr("selectedIndex");var a=this.getCompetitions();if(b==-1){return a[0];}else{return a[b];}};MP_BettingWidget.prototype.getSelectedCompetition=function(){var a=this.getCompetitions();return a[0];};HP_BettingWidget.prototype.getSelectedMatch=function(){var c=null;var a=this.getSelectedCompetition();if(a!=null){var b=$("#matchSelect").attr("selectedIndex");if(b!=-1){c=a.matches[b];}else{c=a.matches[0];}}return c;};TB_BettingWidget.prototype.getSelectedMatch=function(){return this.activeMatch;};HP_BettingWidget.prototype.getSelectedBookie=function(){var a=this.getSelectedMatch();var b=this.getSelectedBookieIndex();return(a.offers[b]);};HP_BettingWidget.prototype.enableSpinners=function(a){$("#bwPlay").hide();$("#bwStop").show();$("#bwSpinners div.bullet").removeClass("active");};HP_BettingWidget.prototype.disableSpinners=function(a){$("#bwStop").hide();$("#bwPlay").show();};HP_BettingWidget.prototype.startClick=function(){this.setUserDriving(false);this.enableSpinners();if(this.hasNotStarted()){this.setStarted();this.startCycling();}else{this.resumeCycling();}};MP_BettingWidget.prototype.startClick=function(){this.setUserDriving(false);this.enableSpinners();if(this.hasNotStarted()){this.setStarted();this.startCycling();}else{this.activeMatch=this.getSelectedMatch();this.resumeCycling();}};HP_BettingWidget.prototype.stopClick=function(){this.stopCycling();this.setUserDriving(true);this.disableSpinners();this.registerImpression();};HP_BettingWidget.prototype.spinnerClick=function(e){var f=$("div.bullet",e);if($(f[0]).hasClass("disabled")){return;}var c=$(f[0]).attr("bid");var a=this.getSelectedMatch();var d=0;for(var b=0;b<a.offers.length;b++){if(a.offers[b].id==c){d=b;break;}}this.forceBookieSelect(d);};HP_BettingWidget.prototype.advanceSpinnerLED=function(){try{var a=this.getSelectedBookieId();var d=$("#bwSpinners div.bullet");d.removeClass("active");var c=0;for(var b=0;b<d.length;b++){if(!($(d[b]).hasClass("disabled"))){if($(d[b]).hasClass("active")){$(d[b]).removeClass("active");}if($(d[b]).attr("bid")==a){c=b;break;}}}if(c>=d.length){c=0;}$(d[c]).addClass("active");}catch(f){bw_alertMsg(f);}};HP_BettingWidget.prototype.resetSpinnerLEDs=function(){try{var a=this.getSelectedMatch();var d=Array();for(var b=0;b<a.offers.length;b++){d.push(a.offers[b].id);}$("#bwSpinners div.bullet").each(function(f,g){$(g).removeClass("active");$(g).removeClass("disabled");var e=$(g).attr("bid");if(($.inArray(parseInt(e),d))==-1){$(g).addClass("disabled");}});}catch(c){bw_alertMsg(c);}};HP_BettingWidget.prototype.forceCompetitionSelect=function(a){try{var d=$("#leagueSelect option");var b=$(d[a]).attr("value");$("#leagueSelect").attr("value",b);this.selectCompetition(a,false);}catch(c){bw_alertMsg(c);}};TB_BettingWidget.prototype.forceCompetitionSelect=function(a){try{this.selectCompetition(a,false);}catch(b){bw_alertMsg(b);}};HP_BettingWidget.prototype.forceMatchSelect=function(c){try{var d=$("#matchSelect option");var a=$(d[c]).attr("value");$("#matchSelect").attr("value",a);this.selectMatch(c,false);}catch(b){bw_alertMsg(b);}};TB_BettingWidget.prototype.forceMatchSelect=function(b){try{this.selectMatch(b,false);}catch(a){bw_alertMsg(a);}};HP_BettingWidget.prototype.forceBookieSelect=function(d){this.selectBookie(d,false);var c=this.getSelectedBookieIndex();var b=this.getSelectedMatch();var a=$("#bwPrevPartner .leftArrow");var g=$("#bwNextPartner .rightArrow");a.each(function(j,h){$(h).removeClass("inactive");});g.each(function(j,h){$(h).removeClass("inactive");});var e=b.offers[c].id;if(this.lastImageClass!=null){$("#bwPartnerLogo").removeClass(this.lastImageClass);}this.lastImageClass=this.getBookieIconClass(e);$("#bwPartnerLogo").addClass(this.lastImageClass);var f=this.getBookieLink(e);$("#bw_affiliateLink").attr("href",f);$("#bw_affiliateLink").attr("ref","nofollow");this.advanceSpinnerLED();this.buildOfferSelector();};TB_BettingWidget.prototype.forceBookieSelect=function(d){this.selectBookie(d,false);var c=this.getSelectedBookieIndex();var b=this.getSelectedMatch();var a=$("#bwPrevPartner .leftNav");var h=$("#bwNextPartner .rightNav");a.each(function(k,j){$(j).removeClass("inactive");});h.each(function(k,j){$(j).removeClass("inactive");});var e=b.offers[c].id;$("#bwPartnerLogo").hide();$("#bwPartnerPromoLink").hide();if(this.lastImageClass!=null){$("#bwPartnerLogo").removeClass(this.lastImageClass);}this.lastImageClass=this.getBookieIconClass(e);$("#bwPartnerLogo").addClass(this.lastImageClass);var f=this.getBookieLink(e);$("#bw_affiliateLink").attr("href",f);$("#bw_affiliateLink").attr("rel","nofollow");var g=this.getBookiePromotionalArray(e);if(g){$("#bwPartnerPromoLink").attr("href",g.url);$("#bwPartnerPromoLink").attr("rel","nofollow");$("#bwPartnerPromoLink").attr("innerHTML",g.label);$("#bwPartnerPromoLink").fadeIn();}else{$("#bwPartnerPromoLink").hide();}$("#bwPartnerLogo").fadeIn();this.buildOfferSelector();};HP_BettingWidget.prototype.buildOffersArray=function(){try{var a=this.getCompetitions();this.allOffers=Array();var h=null;var k=null;var b=null;var l=0;for(var d=0;d<a.length;d++){h=a[d].id;for(var c=0;c<a[d].matches.length;c++){b=a[d].matches[c];k=b.id;var f=Array();f.compId=h;f.gsmmatchid=k;f.addressString=d+","+c;this.allOffers.push(f);}}}catch(g){bw_alertMsg(g);}};HP_BettingWidget.prototype.tick=function(){try{this.bookieCounter++;var a=null;if(this.activeMatch==null){a=this.getRandomOffer();if(a==null){throw ("No matches found on startup");}this.activeOffer=a;this.activeMatch=this.getMatchByAddress(a.addressString);this.bookieCounter=0;}else{a=this.activeOffer;}if(this.bookieCounter>(this.activeMatch.offers.length-1)){a=this.getRandomOffer();if(a==null){this.buildOffersArray();a=this.getRandomOffer();if(a==null){throw ("Tick - lost track of random addresses");this.stopClick();return;}}this.activeOffer=a;this.activeMatch=this.getMatchByAddress(a.addressString);this.bookieCounter=0;}var c=a.addressString+","+this.bookieCounter.toString();this.forceNavigationChain(c);this.advanceSpinnerLED();this.keepCycling();}catch(b){bw_alertMsg("Tick exception "+b);}};MP_BettingWidget.prototype.tick=function(){try{this.bookieCounter++;if(this.activeMatch==null){this.activeMatch=this.getDefaultMatch();this.bookieCounter=0;}var a=this.getOfferByGSMID(this.activeMatch.id);if(this.bookieCounter>(this.activeMatch.offers.length-1)){this.bookieCounter=0;}var c=a.addressString+","+this.bookieCounter.toString();this.forceNavigationChain(c);this.advanceSpinnerLED();this.keepCycling();}catch(b){bw_alertMsg("Tick exception "+b);}};TB_BettingWidget.prototype.tick=function(){try{if($("#bwPrevPartner").hasClass("disabled")){$("#bwPrevPartner").removeClass("disabled");var b=$("#bwPrevPartner img").attr("src");var g=bw_replaceImage(b,"left_nav.png");$("#bwPrevPartner img").attr("src",g);}this.bookieCounter++;if(this.activeMatch==null){this.activeMatch=this.getDefaultMatch();this.bookieCounter=0;}var c=this.getOfferByGSMID(this.activeMatch.id);if(this.bookieCounter>(this.activeMatch.offers.length-1)){this.offerPointer++;if(this.offerPointer>=this.allOffers.length){this.offerPointer=0;}c=this.allOffers[this.offerPointer];this.activeMatch=this.getMatchByAddress(c.addressString);this.bookieCounter=0;this.randomSalt=Math.round(Math.random()*99);if(this.debug){console.log("Random Salt:"+this.randomSalt);}}var a=(this.bookieCounter+this.randomSalt)%this.activeMatch.offers.length;var f=c.addressString+","+a.toString();if(this.debug){console.log("new offer string is "+f);}this.forceNavigationChain(f);if((!(TB_BettingWidget.chunksDone))&&(!(TB_BettingWidget.ajaxActive))){if(this.offerPointer>=(this.allOffers.length-2)){this.pullOffers();}}this.keepCycling();}catch(d){bw_alertMsg("Tick exception "+d);}};TB_MP_BettingWidget.prototype.tick=function(){try{this.bookieCounter++;if(this.activeMatch==null){this.activeMatch=this.getDefaultMatch();this.bookieCounter=0;this.randomSalt=Math.round(Math.random()*99);if(this.debug){console.log("Random Salt:"+this.randomSalt);}}var b=this.getOfferByGSMID(this.activeMatch.id);if(this.bookieCounter>(this.activeMatch.offers.length-1)){this.bookieCounter=0;this.randomSalt=Math.round(Math.random()*99);if(this.debug){console.log("Random Salt:"+this.randomSalt);}}var a=(this.bookieCounter+this.randomSalt)%this.activeMatch.offers.length;var d=b.addressString+","+a.toString();if(this.debug){console.log("new offer string is "+d);}this.forceNavigationChain(d);this.keepCycling();}catch(c){bw_alertMsg("Tick exception "+c);}};HP_BettingWidget.prototype.getRandomOffer=function(){try{var b=0;var a=this.allOffers.length;if(a==0){return null;}if(a>3){var f=--a;b=Math.round(Math.random()*99);}if(b>a){throw (" Random Index too big = "+b+" , offer length = "+this.allOffers.length);}var d=this.allOffers.splice(b,1);return d[0];}catch(c){bw_alertMsg("getRandomOffer exc "+c);}};HP_BettingWidget.prototype.getMatchByAddress=function(a){try{var b=a.split(",");var c=this.getCompetitions();return c[b[0]].matches[b[1]];}catch(d){bw_alertMsg("get match by address exception: in data and ex = "+a+", "+d);return null;}};HP_BettingWidget.prototype.getOfferByGSMID=function(a){try{for(var b=0;b<this.allOffers.length;b++){var d=this.allOffers[b];if(d.gsmmatchid==a){return d;}}return null;}catch(c){bw_alertMsg("getAddress ex "+c);return null;}};MP_BettingWidget.prototype.getDefaultMatch=function(){var b=this.getCompetitions();try{for(var a=0;a<b[0].matches.length;a++){if(b[0].matches[a].def==1){return b[0].matches[a];}}throw ("No default competition found for match preview widget");}catch(c){bw_alertMsg(c);return b[0].matches[0];}};TB_BettingWidget.prototype.getDefaultMatch=function(){var a=this.getCompetitions();try{this.offerPointer=0;return a[0].matches[0];}catch(b){bw_alertMsg(b);return null;}};TB_MP_BettingWidget.prototype.getDefaultMatch=function(){var b=this.getCompetitions();try{for(var a=0;a<b[0].matches.length;a++){if(b[0].matches[a].def==1){return b[0].matches[a];}}throw ("No default competition found for match preview widget");}catch(c){bw_alertMsg(c);return b[0].matches[0];}};HP_BettingWidget.prototype.registerImpression=function(){try{if(this.userIsDriving()){var b=this.getSelectedMatch();var a=this.getSelectedBookie();}}catch(c){bw_alertMsg("register impression exception: "+c);}};TB_BettingWidget.prototype.selectPrevOffer=function(){try{if($("#bwPrevPartner").hasClass("disabled")){return;}this.bookieCounter--;var b=this.getOfferByGSMID(this.activeMatch.id);if(this.bookieCounter<0){this.offerPointer--;if(this.offerPointer<0){this.offerPointer=this.allOffers.length-1;}b=this.allOffers[this.offerPointer];this.activeMatch=this.getMatchByAddress(b.addressString);this.bookieCounter=this.activeMatch.offers.length-1;}this.forceBookieSelect(this.bookieCounter);if((this.bookieCounter==0)&&(this.offerPointer==0)){$("#bwPrevPartner").addClass("disabled");var a=$("#bwPrevPartner img").attr("src");var d=bw_replaceImage(a,"left_nav_disabled.png");$("#bwPrevPartner img").attr("src",d);}}catch(c){bw_alertMsg("Tick exception "+c);}};TB_BettingWidget.prototype.selectNextOffer=function(){try{if($("#bwPrevPartner").hasClass("disabled")){$("#bwPrevPartner").removeClass("disabled");var a=$("#bwPrevPartner img").attr("src");var d=bw_replaceImage(a,"left_nav.png");$("#bwPrevPartner img").attr("src",d);}this.bookieCounter++;var b=this.getOfferByGSMID(this.activeMatch.id);if(this.bookieCounter>(this.activeMatch.offers.length-1)){this.offerPointer++;if(this.offerPointer>=this.allOffers.length){this.offerPointer=0;}b=this.allOffers[this.offerPointer];this.activeMatch=this.getMatchByAddress(b.addressString);this.bookieCounter=0;}this.forceBookieSelect(this.bookieCounter);if((!(TB_BettingWidget.chunksDone))&&(!(TB_BettingWidget.ajaxActive))){if(this.offerPointer>=(this.allOffers.length-2)){this.pullOffers();}}}catch(c){bw_alertMsg("Tick exception "+c);}};TB_MP_BettingWidget.prototype.selectPrevOffer=function(){try{this.bookieCounter--;if(this.bookieCounter<0){this.bookieCounter=this.activeMatch.offers.length-1;}this.forceBookieSelect(this.bookieCounter);}catch(a){bw_alertMsg("TB_MP select next offerexception "+a);}};TB_MP_BettingWidget.prototype.selectNextOffer=function(){try{this.bookieCounter++;if(this.bookieCounter>(this.activeMatch.offers.length-1)){this.bookieCounter=0;}this.forceBookieSelect(this.bookieCounter);}catch(a){bw_alertMsg("TB_MP select next offer exception "+a);}};TB_BettingWidget.prototype.pullOffers=function(){TB_BettingWidget.ajaxActive=true;var a=self.location.pathname.replace(new RegExp("^/([^/]+).*$"),"$1");$.ajax({url:"/"+a+"/betting-widget/index",data:{isJson:1,chunk:TB_BettingWidget.chunk++},success:function(f,b,c){try{TB_BettingWidget.ajaxActive=(!(G_w.appendOffers(f)));TB_BettingWidget.chunksDone=f.data.isLastChunk;}catch(d){bw_alertMsg("Ajax success exception: "+d);}},error:function(c,b,d){bw_alertMsg("pull offers error: "+b);},dataType:"json"});};TB_BettingWidget.prototype.oddsButtonSavedString=null;TB_BettingWidget.chunk=-1;TB_BettingWidget.chunksDone=false;TB_BettingWidget.ajaxActive=false;TB_BettingWidget.COALESCED_COMP_ID=9999;jQuery(document).ready(function(){try{var a=self.location.pathname.replace(new RegExp("^/([^/]+).*$"),"$1");if($("#bettingWidgetAnchor")){if($("#bettingWidgetAnchor").hasClass("matchPreview")){G_w=new MP_BettingWidget(a,$("#bettingWidgetAnchor"));}else{if($("#bettingWidgetAnchor").hasClass("bettingRibbon")){if(($("#bettingWidgetAnchor")).attr("ispreview")=="1"){G_w=new TB_MP_BettingWidget(a,$("#bettingWidgetAnchor"));}else{G_w=new TB_BettingWidget(a,$("#bettingWidgetAnchor"));}}else{G_w=new HP_BettingWidget(a,$("#bettingWidgetAnchor"));}}G_w.loadCompetitionOffersFromPage();}}catch(b){bw_alertMsg(b);}});function trim(b){var a=0;var c=b.length-1;while(a<b.length&&b[a]==" "){a++;}while(c>a&&b[c]==" "){c-=1;}return b.substring(a,c+1);}function bw_showServerException(b){if(false){var a=window.open("","Diagnostic","width=600,height=300");bw_alertMsg("diag window opened");$(a.document.body).html(b);}}function pad(b){var a=b.indexOf(".");if(a==-1){return b;}return((b.substring(b.lastIndexOf("."))).length==3)?b:b+"0";}bw_shutdown=function(){$("#bettingWidgetAnchor").hide();$("#bwErrorPanel").show();};function bw_replaceImage(c,a){var b=c.substring(0,c.lastIndexOf("/"));return b+"/"+a;}function bw_alertMsg(a){if(false){alert(a);}}var __goalPPVWidget=null;var __PPV_USE_ANIMATION=true;function Goal_PPV_Widget(a){try{this.networkEventPointers=Array();this.rrNetworkPointer=-1;this.networkKeys=Array();this.currentNetwork=null;this.isMatchPreview=false;this.timer=null;this.featuredEvent=-1;if($("div.preview").length>0){this.isMatchPreview=true;}this.loadMasterEventList();$("#ppv_playPauseLabel").click(function(c){c.preventDefault();__goalPPVWidget.togglePlayButton();});$("#ppv_playPauseButton").click(function(c){c.preventDefault();__goalPPVWidget.togglePlayButton();});$("#ppvOpenCloseBtn").click(function(c){try{c.preventDefault();var d=(__goalPPVWidget.widgetIsOpen())?"open":"closed";var i=(d=="closed")?"open":"closed";if((d=="closed")&&(i=="open")){if(__goalPPVWidget.isCycling()){__goalPPVWidget.togglePlayButton();}$("#ppv_playPauseButtonLabelBox").hide();$("#ppv_playPauseButton").hide();var f=$("#ppvMasterEventList div.singleListing");var g=$(f[__goalPPVWidget.featuredEvent]).attr("network");__goalPPVWidget.loadEventList(g);$('#ppvEventListingBox div.singleListing[featured="false"]').show();}else{$('#ppvEventListingBox div.singleListing[featured="false"]').hide();if(!(__goalPPVWidget.isCycling())){$("#ppv_playPauseButtonLabelBox").show();$("#ppv_playPauseButton").show();__goalPPVWidget.setPausePlayButtonState("play");__goalPPVWidget.resumeCycling(3000);}}__goalPPVWidget.setWidgetOpenState(i);}catch(h){ppvAlertMsg("Button handler exception "+h);}});this.cyclingActive=function(){return(this.timer!=null);};}catch(b){ppvAlertMsg("PPV Widget Constructor exception: "+b);}}Goal_PPV_Widget.prototype.setNetworkBanner=function(b){try{if(__PPV_USE_ANIMATION){var a=$('#ppvEventListingBox  div.singleListing[featured="true"]');var c=a.height();$("#featuredCurtain").height(c);$("div.blackCurtain").show();}__goalPPVWidget.loadNewBanner(b);}catch(d){ppvAlertMsg("set network banner exception "+d);}};Goal_PPV_Widget.prototype.loadEventListTEST=function(d){var e=$('#ppvEventListingBox div.singleListing[featured="false"]');if(e.length>0){if($(e[0]).attr("network")==d){return;}}targetNetwork=d;$('#ppvEventListingBox div.singleListing[featured="false"]').remove();var b=$("#ppvMasterEventList div.singleListing");for(var c=0;c<b.length;c++){var a=b[c];targetNetwork=(targetNetwork==null)?$(a).attr("network"):targetNetwork;if($(a).attr("network")==targetNetwork){$(a).clone().appendTo($("#nonfeaturedWrapper"));}}};Goal_PPV_Widget.prototype.loadEventList=function(d){var e=$('#ppvEventListingBox div.singleListing[featured="false"]');if(e.length>0){if($(e[0]).attr("network")==d){return;}}targetNetwork=d;$('#ppvEventListingBox div.singleListing[featured="false"]').remove();var b=$("#ppvMasterEventList div.singleListing");for(var c=0;c<b.length;c++){var a=b[c];targetNetwork=(targetNetwork==null)?$(a).attr("network"):targetNetwork;if($(a).attr("network")==targetNetwork){$(a).clone().appendTo($("#ppvEventListingBox"));}}$("#ppvEventListingBox div.singleListing[dontshow]").remove();Goal.ClickTracker.$auto("ppvWidget","#ppvEventListingBox a");};Goal_PPV_Widget.prototype.loadNewBanner=function(c){for(var b=0;b<this.networkKeys.length;b++){var d=false;if($("#networkBanner").hasClass(this.networkKeys[b])){if(this.networkKeys[b]==c){d=true;break;}else{$("#networkBanner").removeClass(this.networkKeys[b]);break;}}}if(!(d)){if(c!=null){$("#networkBanner").addClass(c);var a=G_PPV_EventCalendar.networkURLs[c];$("#ppvBannerLink").attr("href",a);$("#ppvBannerLink").attr("title",c);Goal.ClickTracker.$auto("ppvWidget","#ppvBannerLink");}}if(__PPV_USE_ANIMATION){$("div.blackCurtain").fadeOut(2000);}};Goal_PPV_Widget.prototype.startCycling=function(){this.featuredEvent=-1;this.featureEvent();this.resumeCycling();};Goal_PPV_Widget.prototype.stopCycling=function(){clearTimeout(this.timer);this.timer=null;};Goal_PPV_Widget.prototype.resumeCycling=function(b){var a=(b==undefined)?500:b;if(this.timer!=null){clearTimeout(this.timer);}this.timer=setTimeout("__goalPPVWidget.tick()",a);};Goal_PPV_Widget.prototype.tick=function(){this.featureEvent();this.timer=setTimeout("__goalPPVWidget.tick()",7000);};Goal_PPV_Widget.prototype.isCycling=function(){return this.cyclingActive();};Goal_PPV_Widget.prototype.setPausePlayButtonState=function(f){try{var g="";var c="";if($("img.pauseButton").length==0){return;}var b=$("img.pauseButton").attr("src");var a=b.lastIndexOf("/");b=b.substring(0,a);if(f=="play"){g=b+"/ppv_pause.png";c=$("#pauseListingsString").attr("innerHTML");}if(f=="pause"){g=b+"/ppv_play.png";c=$("#playListingsString").attr("innerHTML");}if(g==""){throw new Exception("Unknown button state "+f);}$("img.pauseButton").attr("src",g);$("#ppv_playPauseLabel").attr("innerHTML",c);$("#ppv_playPauseButton").attr("state",f);}catch(d){ppvAlertMsg("set play button state ex "+d);}};Goal_PPV_Widget.prototype.getPausePlayButtonState=function(){return $("#ppv_playPauseButton").attr("state");};Goal_PPV_Widget.prototype.togglePlayButton=function(){try{var a=__goalPPVWidget.getPausePlayButtonState();var c=(a=="play")?"pause":"play";__goalPPVWidget.setPausePlayButtonState(c);if(c=="pause"){__goalPPVWidget.stopCycling();}else{__goalPPVWidget.resumeCycling();}}catch(b){ppvAlertMsg("toggle play button exception "+b);}};Goal_PPV_Widget.prototype.featureEvent=function(){try{var g=$("#ppvMasterEventList div.singleListing");var b=$('#ppvEventListingBox div.singleListing[featured="true"]');$("#ppvMasterEventList div.singleListing[dontshow]").removeAttr("dontshow");$(b[0]).removeClass("live-match").removeClass("premier-match");if(g.length<2){return;}this.rrNetworkPointer++;if(this.rrNetworkPointer>=this.networkKeys.length){this.rrNetworkPointer=0;}var j=this.networkKeys[this.rrNetworkPointer];var a=this.networkEventPointers[j];a.pointer++;if(a.pointer>=a.eventIndex.length){a.pointer=0;}this.featuredEvent=a.eventIndex[a.pointer];var c=$(b).width();var k=$(b).height();var h=this.isMatchPreview?30:35;k=(k==0)?h:k;var d=$(g[this.featuredEvent]);var f="<div id='featuredCurtain' class='blackCurtain' style='display:none; width:"+c+"px; height:"+k+"px;  position:absolute; z-index:100; background-color:black;'></div>"+d.html();d.attr("dontshow","true");$(b[0]).html(f);$(b[0]).attr("featured",true);if(d.hasClass("live-match")){b.addClass("live-match");}if(d.hasClass("premier-match")){b.addClass("premier-match");}this.currentNetwork=$(g[this.featuredEvent]).attr("network");this.setNetworkBanner($(g[this.featuredEvent]).attr("network"));}catch(i){ppvAlertMsg(" feature event exception "+i);}Goal.ClickTracker.$auto("ppvWidget","#ppvWidgetAnchor .watchBtn a");};Goal_PPV_Widget.prototype.widgetIsOpen=function(){return($("#ppvOpenCloseBtn").attr("state")=="open");};Goal_PPV_Widget.prototype.setWidgetOpenState=function(f){try{if((f!="open")&&(f!="closed")){throw ("unknown button state");}var a=$("#ppvOpenCloseBtn");$(a).attr("state",f);var c=(f=="closed")?"#openWidgetString":"#closeWidgetString";$("#ppvOpenCloseBtnLabel").attr("innerHTML",$(c).attr("innerHTML"));if(f=="closed"){var b=$("#ppvOpenCloseBtn div.up");b.removeClass("up");b.addClass("down");}else{var b=$("#ppvOpenCloseBtn div.down");b.removeClass("down");b.addClass("up");}}catch(d){ppvAlertMsg("Widget button management exception "+d);}Goal.ClickTracker.$auto("ppvWidget","#ppvWidgetAnchor .watchBtn a");};Goal_PPV_Widget.prototype.loadMasterEventList=function(){try{var f="";for(var g=0;g<G_PPV_EventCalendar.ppvevents.length;g++){var l=G_PPV_EventCalendar.ppvevents[g];if(this.networkEventPointers[l.network]==undefined){this.networkEventPointers[l.network]=Array();this.networkEventPointers[l.network]["pointer"]=-1;this.networkEventPointers[l.network]["eventIndex"]=Array();this.networkKeys.push(l.network);}this.networkEventPointers[l.network]["eventIndex"].push(g);var m=G_PPV_EventCalendar.networkURLs[l.network]+l.urlParams;var b=l.live?" live-match":"";var a=l.premier?" premier-match":"";var c=l.live?"Live":"";var o=l.premier?"Premier":"";var h='<tr class="special-row"><td>'+c+" "+o+'</td><td colspan="2">&nbsp;</td></tr>';var k="";if(b||a){k='<br /><span class="special-row">'+c+" "+o+"</span>";}if(this.isMatchPreview){f+="<div class='singleListing"+b+a+"' featured='false'  network='"+l.network+"' > <table><tr><td class='date'>"+l.goalDate+k+"</td><td class='time'>"+l.goalTime+"</td>";if(l.awayTeam.length==0){f+="<td class='teamName home'><a target='_blank' href='"+m+"' title='"+l.network+"'>"+l.homeTeam+"</a></td>";}else{var d=l.homeTeam+"&nbsp;v. "+l.awayTeam;var n=l.network+" - "+d;if(d.length>80){d=d.substr(0,80)+"&hellip;";}f+="<td class='teamName home'><a target='_blank' href='"+m+"' title='"+n+"'>"+d+"</a></td>";}f+="</tr></table></div>";}else{f+="<div class='singleListing"+b+a+"' featured='false'  network='"+l.network+"' ><table>"+h+"<tr><td class='date' rowspan='2'>"+l.goalDate+" <br />"+l.goalTime+"</td>";if(l.awayTeam.length==0){f+="<td class='teamName'>"+l.homeTeam+"</td>";}else{f+="<td class='teamName'>"+l.homeTeam+" v.<br />"+l.awayTeam+"</td>";}f+="<td class = 'watchBtn' rowspan='2'><div class='btnContainer'><a target='_blank' href='"+m+"' title='"+l.network+"'>Watch&nbsp;&raquo;</a></div></td>";f+="</tr></table></div>";}}$("#ppvMasterEventList").append(f);}catch(j){ppvAlertMsg("update master event list exception "+j);}};jQuery(document).ready(function(){try{if($("#ppvWidgetAnchor").length==0){return;}if(G_PPV_EventCalendar===undefined){return;}if(G_PPV_EventCalendar.rC!=1){ppvAlertMsg("source data NG");$("#ppvWidgetAnchor").hide();return;}__goalPPVWidget=new Goal_PPV_Widget(G_PPV_EventCalendar);__goalPPVWidget.setPausePlayButtonState("play");__goalPPVWidget.setWidgetOpenState("closed");__goalPPVWidget.startCycling();}catch(a){ppvAlertMsg("On ready exception: "+a);}});ppvAlertMsg=function(a){if(false){alert(a);}};eval(function(h,b,i,d,g,f){g=function(a){return(a<b?"":g(parseInt(a/b)))+((a=a%b)>35?String.fromCharCode(a+29):a.toString(36));};if(!"".replace(/^/,String)){while(i--){f[g(i)]=d[i]||g(i);}d=[function(a){return f[a];}];g=function(){return"\\w+";};i=1;}while(i--){if(d[i]){h=h.replace(new RegExp("\\b"+g(i)+"\\b","g"),d[i]);}}return h;}("(9($){$.1v.C=9(o){z 4.1b(9(){3p r(4,o)})};8 q={Z:F,25:1,21:1,u:7,1c:3,15:7,1K:'2X',2c:'2Q',1q:0,B:7,1j:7,1G:7,2F:7,2B:7,2z:7,2x:7,2v:7,2s:7,2p:7,1S:'<P></P>',1Q:'<P></P>',2m:'2l',2k:'2l',1O:7,1L:7};$.C=9(e,o){4.5=$.16({},q,o||{});4.Q=F;4.D=7;4.H=7;4.t=7;4.U=7;4.R=7;4.N=!4.5.Z?'1H':'26';4.E=!4.5.Z?'24':'23';8 a='',1e=e.K.1e(' ');1r(8 i=0;i<1e.I;i++){6(1e[i].2y('C-2w')!=-1){$(e).1E(1e[i]);8 a=1e[i];1p}}6(e.2t=='3o'||e.2t=='3n'){4.t=$(e);4.D=4.t.19();6(4.D.1o('C-H')){6(!4.D.19().1o('C-D'))4.D=4.D.B('<P></P>');4.D=4.D.19()}10 6(!4.D.1o('C-D'))4.D=4.t.B('<P></P>').19()}10{4.D=$(e);4.t=$(e).3h('>2o,>2n,P>2o,P>2n')}6(a!=''&&4.D.19()[0].K.2y('C-2w')==-1)4.D.B('<P 3g=\" '+a+'\"></P>');4.H=4.t.19();6(!4.H.I||!4.H.1o('C-H'))4.H=4.t.B('<P></P>').19();4.R=$('.C-11',4.D);6(4.R.u()==0&&4.5.1Q!=7)4.R=4.H.1z(4.5.1Q).11();4.R.V(4.K('C-11'));4.U=$('.C-17',4.D);6(4.U.u()==0&&4.5.1S!=7)4.U=4.H.1z(4.5.1S).11();4.U.V(4.K('C-17'));4.H.V(4.K('C-H'));4.t.V(4.K('C-t'));4.D.V(4.K('C-D'));8 b=4.5.15!=7?1k.1P(4.1m()/4.5.15):7;8 c=4.t.32('1F');8 d=4;6(c.u()>0){8 f=0,i=4.5.21;c.1b(9(){d.1I(4,i++);f+=d.S(4,b)});4.t.y(4.N,f+'T');6(!o||o.u===J)4.5.u=c.u()}4.D.y('1y','1A');4.U.y('1y','1A');4.R.y('1y','1A');4.2G=9(){d.17()};4.2b=9(){d.11()};4.1U=9(){d.2q()};6(4.5.1j!=7)4.5.1j(4,'2a');6($.2A.28){4.1f(F,F);$(27).1u('2I',9(){d.1t()})}10 4.1t()};8 r=$.C;r.1v=r.2H={C:'0.2.3'};r.1v.16=r.16=$.16;r.1v.16({1t:9(){4.A=7;4.G=7;4.X=7;4.13=7;4.14=F;4.1d=7;4.O=7;4.W=F;6(4.Q)z;4.t.y(4.E,4.1s(4.5.21)+'T');8 p=4.1s(4.5.25);4.X=4.13=7;4.1i(p,F);$(27).22('2E',4.1U).1u('2E',4.1U)},2D:9(){4.t.2C();4.t.y(4.E,'3u');4.t.y(4.N,'3t');6(4.5.1j!=7)4.5.1j(4,'2D');4.1t()},2q:9(){6(4.O!=7&&4.W)4.t.y(4.E,r.M(4.t.y(4.E))+4.O);4.O=7;4.W=F;6(4.5.1G!=7)4.5.1G(4);6(4.5.15!=7){8 a=4;8 b=1k.1P(4.1m()/4.5.15),N=0,E=0;$('1F',4.t).1b(9(i){N+=a.S(4,b);6(i+1<a.A)E=N});4.t.y(4.N,N+'T');4.t.y(4.E,-E+'T')}4.1c(4.A,F)},3s:9(){4.Q=1h;4.1f()},3r:9(){4.Q=F;4.1f()},u:9(s){6(s!=J){4.5.u=s;6(!4.Q)4.1f()}z 4.5.u},3q:9(i,a){6(a==J||!a)a=i;6(4.5.u!==7&&a>4.5.u)a=4.5.u;1r(8 j=i;j<=a;j++){8 e=4.L(j);6(!e.I||e.1o('C-1a-1D'))z F}z 1h},L:9(i){z $('.C-1a-'+i,4.t)},2u:9(i,s){8 e=4.L(i),20=0,2u=0;6(e.I==0){8 c,e=4.1B(i),j=r.M(i);1n(c=4.L(--j)){6(j<=0||c.I){j<=0?4.t.2r(e):c.1X(e);1p}}}10 20=4.S(e);e.1E(4.K('C-1a-1D'));1R s=='3l'?e.3k(s):e.2C().3j(s);8 a=4.5.15!=7?1k.1P(4.1m()/4.5.15):7;8 b=4.S(e,a)-20;6(i>0&&i<4.A)4.t.y(4.E,r.M(4.t.y(4.E))-b+'T');4.t.y(4.N,r.M(4.t.y(4.N))+b+'T');z e},1V:9(i){8 e=4.L(i);6(!e.I||(i>=4.A&&i<=4.G))z;8 d=4.S(e);6(i<4.A)4.t.y(4.E,r.M(4.t.y(4.E))+d+'T');e.1V();4.t.y(4.N,r.M(4.t.y(4.N))-d+'T')},17:9(){4.1C();6(4.O!=7&&!4.W)4.1T(F);10 4.1c(((4.5.B=='1Z'||4.5.B=='G')&&4.5.u!=7&&4.G==4.5.u)?1:4.A+4.5.1c)},11:9(){4.1C();6(4.O!=7&&4.W)4.1T(1h);10 4.1c(((4.5.B=='1Z'||4.5.B=='A')&&4.5.u!=7&&4.A==1)?4.5.u:4.A-4.5.1c)},1T:9(b){6(4.Q||4.14||!4.O)z;8 a=r.M(4.t.y(4.E));!b?a-=4.O:a+=4.O;4.W=!b;4.X=4.A;4.13=4.G;4.1i(a)},1c:9(i,a){6(4.Q||4.14)z;4.1i(4.1s(i),a)},1s:9(i){6(4.Q||4.14)z;6(4.5.B!='18')i=i<1?1:(4.5.u&&i>4.5.u?4.5.u:i);8 a=4.A>i;8 b=r.M(4.t.y(4.E));8 f=4.5.B!='18'&&4.A<=1?1:4.A;8 c=a?4.L(f):4.L(4.G);8 j=a?f:f-1;8 e=7,l=0,p=F,d=0;1n(a?--j>=i:++j<i){e=4.L(j);p=!e.I;6(e.I==0){e=4.1B(j).V(4.K('C-1a-1D'));c[a?'1z':'1X'](e)}c=e;d=4.S(e);6(p)l+=d;6(4.A!=7&&(4.5.B=='18'||(j>=1&&(4.5.u==7||j<=4.5.u))))b=a?b+d:b-d}8 g=4.1m();8 h=[];8 k=0,j=i,v=0;8 c=4.L(i-1);1n(++k){e=4.L(j);p=!e.I;6(e.I==0){e=4.1B(j).V(4.K('C-1a-1D'));c.I==0?4.t.2r(e):c[a?'1z':'1X'](e)}c=e;8 d=4.S(e);6(d==0){3f('3e: 3d 1H/26 3c 1r 3b. 3a 39 38 37 36 35. 34...');z 0}6(4.5.B!='18'&&4.5.u!==7&&j>4.5.u)h.33(e);10 6(p)l+=d;v+=d;6(v>=g)1p;j++}1r(8 x=0;x<h.I;x++)h[x].1V();6(l>0){4.t.y(4.N,4.S(4.t)+l+'T');6(a){b-=l;4.t.y(4.E,r.M(4.t.y(4.E))-l+'T')}}8 n=i+k-1;6(4.5.B!='18'&&4.5.u&&n>4.5.u)n=4.5.u;6(j>n){k=0,j=n,v=0;1n(++k){8 e=4.L(j--);6(!e.I)1p;v+=4.S(e);6(v>=g)1p}}8 o=n-k+1;6(4.5.B!='18'&&o<1)o=1;6(4.W&&a){b+=4.O;4.W=F}4.O=7;6(4.5.B!='18'&&n==4.5.u&&(n-k+1)>=1){8 m=r.Y(4.L(n),!4.5.Z?'1l':'1N');6((v-m)>g)4.O=v-g-m}1n(i-->o)b+=4.S(4.L(i));4.X=4.A;4.13=4.G;4.A=o;4.G=n;z b},1i:9(p,a){6(4.Q||4.14)z;4.14=1h;8 b=4;8 c=9(){b.14=F;6(p==0)b.t.y(b.E,0);6(b.5.B=='1Z'||b.5.B=='G'||b.5.u==7||b.G<b.5.u)b.2j();b.1f();b.1M('2i')};4.1M('31');6(!4.5.1K||a==F){4.t.y(4.E,p+'T');c()}10{8 o=!4.5.Z?{'24':p}:{'23':p};4.t.1i(o,4.5.1K,4.5.2c,c)}},2j:9(s){6(s!=J)4.5.1q=s;6(4.5.1q==0)z 4.1C();6(4.1d!=7)z;8 a=4;4.1d=30(9(){a.17()},4.5.1q*2Z)},1C:9(){6(4.1d==7)z;2Y(4.1d);4.1d=7},1f:9(n,p){6(n==J||n==7){8 n=!4.Q&&4.5.u!==0&&((4.5.B&&4.5.B!='A')||4.5.u==7||4.G<4.5.u);6(!4.Q&&(!4.5.B||4.5.B=='A')&&4.5.u!=7&&4.G>=4.5.u)n=4.O!=7&&!4.W}6(p==J||p==7){8 p=!4.Q&&4.5.u!==0&&((4.5.B&&4.5.B!='G')||4.A>1);6(!4.Q&&(!4.5.B||4.5.B=='G')&&4.5.u!=7&&4.A==1)p=4.O!=7&&4.W}8 a=4;4.U[n?'1u':'22'](4.5.2m,4.2G)[n?'1E':'V'](4.K('C-17-1w')).1J('1w',n?F:1h);4.R[p?'1u':'22'](4.5.2k,4.2b)[p?'1E':'V'](4.K('C-11-1w')).1J('1w',p?F:1h);6(4.U.I>0&&(4.U[0].1g==J||4.U[0].1g!=n)&&4.5.1O!=7){4.U.1b(9(){a.5.1O(a,4,n)});4.U[0].1g=n}6(4.R.I>0&&(4.R[0].1g==J||4.R[0].1g!=p)&&4.5.1L!=7){4.R.1b(9(){a.5.1L(a,4,p)});4.R[0].1g=p}},1M:9(a){8 b=4.X==7?'2a':(4.X<4.A?'17':'11');4.12('2F',a,b);6(4.X!==4.A){4.12('2B',a,b,4.A);4.12('2z',a,b,4.X)}6(4.13!==4.G){4.12('2x',a,b,4.G);4.12('2v',a,b,4.13)}4.12('2s',a,b,4.A,4.G,4.X,4.13);4.12('2p',a,b,4.X,4.13,4.A,4.G)},12:9(a,b,c,d,e,f,g){6(4.5[a]==J||(1R 4.5[a]!='2h'&&b!='2i'))z;8 h=1R 4.5[a]=='2h'?4.5[a][b]:4.5[a];6(!$.2W(h))z;8 j=4;6(d===J)h(j,c,b);10 6(e===J)4.L(d).1b(9(){h(j,4,d,c,b)});10{1r(8 i=d;i<=e;i++)6(i!==7&&!(i>=f&&i<=g))4.L(i).1b(9(){h(j,4,i,c,b)})}},1B:9(i){z 4.1I('<1F></1F>',i)},1I:9(e,i){8 a=$(e).V(4.K('C-1a')).V(4.K('C-1a-'+i));a.1J('2V',i);z a},K:9(c){z c+' '+c+(!4.5.Z?'-2U':'-Z')},S:9(e,d){8 a=e.2g!=J?e[0]:e;8 b=!4.5.Z?a.1x+r.Y(a,'2f')+r.Y(a,'1l'):a.2e+r.Y(a,'2d')+r.Y(a,'1N');6(d==J||b==d)z b;8 w=!4.5.Z?d-r.Y(a,'2f')-r.Y(a,'1l'):d-r.Y(a,'2d')-r.Y(a,'1N');$(a).y(4.N,w+'T');z 4.S(a)},1m:9(){z!4.5.Z?4.H[0].1x-r.M(4.H.y('2T'))-r.M(4.H.y('2S')):4.H[0].2e-r.M(4.H.y('2R'))-r.M(4.H.y('3i'))},2P:9(i,s){6(s==J)s=4.5.u;z 1k.2O((((i-1)/s)-1k.2N((i-1)/s))*s)+1}});r.16({3m:9(d){z $.16(q,d||{})},Y:9(e,p){6(!e)z 0;8 a=e.2g!=J?e[0]:e;6(p=='1l'&&$.2A.28){8 b={'1y':'1A','2M':'2L','1H':'1q'},1Y,1W;$.29(a,b,9(){1Y=a.1x});b['1l']=0;$.29(a,b,9(){1W=a.1x});z 1W-1Y}z r.M($.y(a,p))},M:9(v){v=2K(v);z 2J(v)?0:v}})})(3v);",62,218,"||||this|options|if|null|var|function||||||||||||||||||||list|size||||css|return|first|wrap|jcarousel|container|lt|false|last|clip|length|undefined|className|get|intval|wh|tail|div|locked|buttonPrev|dimension|px|buttonNext|addClass|inTail|prevFirst|margin|vertical|else|prev|callback|prevLast|animating|visible|extend|next|circular|parent|item|each|scroll|timer|split|buttons|jcarouselstate|true|animate|initCallback|Math|marginRight|clipping|while|hasClass|break|auto|for|pos|setup|bind|fn|disabled|offsetWidth|display|before|block|create|stopAuto|placeholder|removeClass|li|reloadCallback|width|format|attr|animation|buttonPrevCallback|notify|marginBottom|buttonNextCallback|ceil|buttonPrevHTML|typeof|buttonNextHTML|scrollTail|funcResize|remove|oWidth2|after|oWidth|both|old|offset|unbind|top|left|start|height|window|safari|swap|init|funcPrev|easing|marginTop|offsetHeight|marginLeft|jquery|object|onAfterAnimation|startAuto|buttonPrevEvent|click|buttonNextEvent|ol|ul|itemVisibleOutCallback|reload|prepend|itemVisibleInCallback|nodeName|add|itemLastOutCallback|skin|itemLastInCallback|indexOf|itemFirstOutCallback|browser|itemFirstInCallback|empty|reset|resize|itemLoadCallback|funcNext|prototype|load|isNaN|parseInt|none|float|floor|round|index|swing|borderTopWidth|borderRightWidth|borderLeftWidth|horizontal|jcarouselindex|isFunction|normal|clearTimeout|1000|setTimeout|onBeforeAnimation|children|push|Aborting|loop|infinite|an|cause|will|This|items|set|No|jCarousel|isNan|class|find|borderBottomWidth|append|html|string|defaults|OL|UL|new|has|unlock|lock|10px|0px|jQuery".split("|"),0,{}));var rtlScrollTracker=1;var globalStage={};function mycarousel_stageChangeUpdate(d,a,b,c){jQuery("#stageRight li.currentStage").removeClass("currentStage");jQuery("#stageRight li a[index='"+b+"']").parent().addClass("currentStage");jQuery(".video-stage object, .video-stage embed").remove();jQuery(".video-stage-placeholder").show();}function mycarousel_initCallback(a){globalStage=a;$(".linksPlaceHolder").hide();$(".stageRelatedLinks").show();a.clip.hover(function(){a.stopAuto();rtlScrollTracker=0;},function(){a.startAuto();rtlScrollTracker=1;});$("#stageRight a").bind("click",function(){a.scroll(jQuery.jcarousel.intval(this.getAttribute("index")));a.startAuto(0);rtlScrollTracker=0;index=this.getAttribute("index");$(this).blur();setTimeout("jQuery('li[jcarouselindex=\""+index+"\"] .video-stage-placeholder').click();",700);return false;});$(".video-stage-placeholder").click(function(){a.startAuto(0);var g=Math.floor(Math.random()*1001);var f={wmode:"opaque"};var b=$(this).closest(".video-stage").attr("playerid");var c=$(this).closest(".video-stage").attr("channelid");var d=$(this).closest(".video-stage").attr("videoid");var e=$(this).closest(".video-stage").attr("partnerId");$(this).closest(".video-stage").prepend('<div id="ePlayerContent-'+g+'" class="flash-eplayer-wrapper"><a href="http://www.adobe.com/go/getflashplayer" target="_blank"><img  src="http://images.eplayer.performgroup.com/namedImage/12637/install_flash.gif" alt="Get Adobe Flash player" /></a></div>');addPlayer(c,d,e,"ePlayerContent-"+g,true,false,b,"eplayer9");$(this).hide();});}jQuery(document).ready(function(){var c=($("#contentBackground"))?"center 0px":"top center";var a=$("body").css("background-image");if(a!="none"){newCSS={"background-attachment":"fixed","background-position":c};$("body").css(newCSS);}var b=1;jQuery("#mycarousel").jcarousel({vertical:true,scroll:1,start:b,auto:10,wrap:"both",initCallback:mycarousel_initCallback,itemFirstInCallback:mycarousel_stageChangeUpdate,buttonNextHTML:null,buttonPrevHTML:null});jQuery("#stageRight").jcarousel({start:b,scroll:1,auto:0,vertical:true});jQuery("#stage_storyContainer h3").each(function(){if($(this).height()>40){$(this).addClass("doubleLine");}});jQuery(".newsFeedNavigationUp").bind("click",function(){jQuery("div#breakingNewsList div.animationDiv").animate({top:"-162px"});jQuery(".newsFeedNavigationDown").show();jQuery(this).hide();});jQuery(".newsFeedNavigationDown").bind("click",function(){jQuery("div#breakingNewsList div.animationDiv").animate({top:"0px"});jQuery(".newsFeedNavigationUp").show();jQuery(this).hide();});$("#single_story_stage .video-stage-placeholder").click(function(){var i=Math.floor(Math.random()*1001);var h={wmode:"opaque"};var d=$(this).closest(".video-stage").attr("playerid");var e=$(this).closest(".video-stage").attr("channelid");var f=$(this).closest(".video-stage").attr("videoid");var g=$(this).closest(".video-stage").attr("partnerId");$(this).closest(".video-stage").prepend('<div id="ePlayerContent-'+i+'" class="flash-eplayer-wrapper"><a href="http://www.adobe.com/go/getflashplayer" target="_blank"><img  src="http://images.eplayer.performgroup.com/namedImage/12637/install_flash.gif" alt="Get Adobe Flash player" /></a></div>');addPlayer(e,f,g,"ePlayerContent-"+i,true,false,d,"eplayer9");$(this).hide();});});if($("#header-swf-logo")){FlashReplace.replace("header-swf-logo","/web/goal/current/images/default/goal_header.swf","goal-com-swf-logo",270,68,null,{wmode:"transparent"});}jQuery(document).ready(function(){if($("#breakingNewsLink").length>0){if(($("#headlinesList li")).length==0){$("#headlinesLink").hide();$("#breakingNewsLink").click(function(a){a.preventDefault();});}else{$("#breakingNewsLink").click(function(a){a.preventDefault();Goal_resetNewsFeedPanel(a.target);});$("#headlinesLink").click(function(a){a.preventDefault();Goal_resetNewsFeedPanel(a.target);});}}});Goal_resetNewsFeedPanel=function(b){try{var d=0;var a=$("#newsFeedHeader li");a.each(function(e,h){var i=$("a",h);if(i[0]==b){d=e;if(!($(h).hasClass("selected"))){$(h).addClass("selected");}}else{$(h).removeClass("selected");var g=$(i[0]).attr("id")+"";}});var c=$("div.newsFeedList");$(c).hide();$(c[d]).fadeIn(1000);}catch(f){alert("Exception: "+f);}};jQuery(document).ready(function(){if($("#articlesModule").length>0){$(".tabLi a").click(function(d){Goal_resetArticlePanel(d.target);d.preventDefault();});var c=$(".articlesList");var b=$(".tabLi");var a=$(".articlesList");a.each(function(d,e){if($("ol li",e).length==0){$(c[d]).hide();$(b[d]).hide();}});}});Goal_resetArticlePanel=function(a){try{var c=0;var f=$(".tabLi");f.each(function(e,g){var h=$("a",g);if(h[0]==a){c=e;if(!($(g).hasClass("selected"))){$(g).addClass("selected");}}else{$(g).removeClass("selected");}});var b=$("div.articlesList");$(b).hide();$(b[c]).fadeIn(1000);}catch(d){alert("Exception: "+d);}};jQuery(document).ready(function(){jQuery(".transferModuleTabs").bind("click",function(){var a=$(this).attr("id")+"_pane";var b="transferModuleTabContent";$(".transferModuleTabs").removeClass("selected");$(this).addClass("selected");$("."+b).hide();$("#"+a).fadeIn();});});function ftvlaunchold(c,f,b){var a=(screen.width)?(screen.width-670)/2:0;var e=(screen.height)?(screen.height-500)/2:0;var d=window.open("http://bongo.zoomin.tv/videoplayer/index.cfm?id="+c+"&mode=normal&quality="+f+"&pid="+b,"MTV6_window","toolbar=no,width=670,height=500,top="+e+",left="+a+",directories=no,status=no,statusbar=0,scrollbars=no,resizable=no,menubar=no");d.focus();}function ftvlaunch(c,f,b){if(b=="t-online"){var a=(screen.width)?(screen.width-665)/2:0;var e=(screen.height)?(screen.height-430)/2:0;var d=window.open("http://bongo.zoomin.tv/videoplayer/index.cfm?id="+c+"&mode=normal&quality="+f+"&pid="+b,"MTV6_window","toolbar=no,width=665,height=430,top="+e+",left="+a+",directories=no,status=no,statusbar=0,scrollbars=no,resizable=no,menubar=no");d.focus();}else{var a=(screen.width)?(screen.width-670)/2:0;var e=(screen.height)?(screen.height-500)/2:0;var d=window.open("http://bongo.zoomin.tv/videoplayer/index.cfm?id="+c+"&mode=normal&quality="+f+"&pid="+b,"MTV6_window","toolbar=no,width=670,height=500,top="+e+",left="+a+",directories=no,status=no,statusbar=0,scrollbars=no,resizable=no,menubar=no");d.focus();}}(function(a){a.event.special.mousewheel={setup:function(){var b=a.event.special.mousewheel.handler;if(a.browser.mozilla){a(this).bind("mousemove.mousewheel",function(c){a.data(this,"mwcursorposdata",{pageX:c.pageX,pageY:c.pageY,clientX:c.clientX,clientY:c.clientY});});}if(this.addEventListener){this.addEventListener((a.browser.mozilla?"DOMMouseScroll":"mousewheel"),b,false);}else{this.onmousewheel=b;}},teardown:function(){var b=a.event.special.mousewheel.handler;a(this).unbind("mousemove.mousewheel");if(this.removeEventListener){this.removeEventListener((a.browser.mozilla?"DOMMouseScroll":"mousewheel"),b,false);}else{this.onmousewheel=function(){};}a.removeData(this,"mwcursorposdata");},handler:function(d){var c=Array.prototype.slice.call(arguments,1);d=a.event.fix(d||window.event);a.extend(d,a.data(this,"mwcursorposdata")||{});var e=0,b=true;if(d.wheelDelta){e=d.wheelDelta/120;}if(d.detail){e=-d.detail/3;}d.data=d.data||{};d.type="mousewheel";c.unshift(e);c.unshift(d);return a.event.handle.apply(this,c);}};a.fn.extend({mousewheel:function(b){return b?this.bind("mousewheel",b):this.trigger("mousewheel");},unmousewheel:function(b){return this.unbind("mousewheel",b);}});})(jQuery);(function(a){a.jScrollPane={active:[]};a.fn.jScrollPane=function(c){c=a.extend({},a.fn.jScrollPane.defaults,c);var b=function(){return false;};return this.each(function(){var r=a(this);r.css("overflow","hidden");var H=this;if(a(this).parent().is(".jScrollPaneContainer")){var ad=c.maintainPosition?r.position().top:0;var n=a(this).parent();var B=n.innerWidth();var ab=n.outerHeight();var m=ab;a(">.jScrollPaneTrack, >.jScrollArrowUp, >.jScrollArrowDown",n).remove();r.css({top:0});}else{var ad=0;this.originalPadding=r.css("paddingTop")+" "+r.css("paddingRight")+" "+r.css("paddingBottom")+" "+r.css("paddingLeft");this.originalSidePaddingTotal=(parseInt(r.css("paddingLeft"))||0)+(parseInt(r.css("paddingRight"))||0);var B=r.innerWidth();var ab=r.innerHeight();var m=ab;r.wrap(a("<div></div>").attr({className:"jScrollPaneContainer"}).css({height:ab+"px",width:B+"px"}));a(document).bind("emchange",function(ae,af,p){r.jScrollPane(c);});}if(c.reinitialiseOnImageLoad){var M=a.data(H,"jScrollPaneImagesToLoad")||a("img",r);var i=[];if(M.length){M.each(function(p,ae){a(this).bind("load",function(){if(a.inArray(p,i)==-1){i.push(ae);M=a.grep(M,function(ag,af){return ag!=ae;});a.data(H,"jScrollPaneImagesToLoad",M);c.reinitialiseOnImageLoad=false;r.jScrollPane(c);}}).each(function(af,ag){if(this.complete||this.complete===undefined){this.src=this.src;}});});}}var R=this.originalSidePaddingTotal;var o={height:"auto",width:B-c.scrollbarWidth-c.scrollbarMargin-R+"px"};if(c.scrollbarOnLeft){o.paddingLeft=c.scrollbarMargin+c.scrollbarWidth+"px";}else{o.paddingRight=c.scrollbarMargin+"px";}r.css(o);var l=r[0].scrollHeight;var t=ab/l;if(t<0.99){var j=r.parent();j.append(a("<div></div>").attr({className:"jScrollPaneTrack"}).css({width:c.scrollbarWidth+"px"}).append(a("<div></div>").attr({className:"jScrollPaneDrag"}).css({width:c.scrollbarWidth+"px"}).append(a("<div></div>").attr({className:"jScrollPaneDragTop"}).css({width:c.scrollbarWidth+"px"}),a("<div></div>").attr({className:"jScrollPaneDragBottom"}).css({width:c.scrollbarWidth+"px"}))));var Z=a(">.jScrollPaneTrack",j);var s=a(">.jScrollPaneTrack .jScrollPaneDrag",j);if(c.showArrows){var I;var ac;var v;var T;var q=function(){if(T>4||T%4==0){Y(f+ac*D);}T++;};var O=function(p){a("html").unbind("mouseup",O);I.removeClass("jScrollActiveArrowButton");clearInterval(v);};var z=function(){a("html").bind("mouseup",O);I.addClass("jScrollActiveArrowButton");T=0;q();v=setInterval(q,100);};j.append(a("<a></a>").attr({href:"javascript:;",className:"jScrollArrowUp"}).css({width:c.scrollbarWidth+"px"}).html("Scroll up").bind("mousedown",function(){I=a(this);ac=-1;z();this.blur();return false;}).bind("click",b),a("<a></a>").attr({href:"javascript:;",className:"jScrollArrowDown"}).css({width:c.scrollbarWidth+"px"}).html("Scroll down").bind("mousedown",function(){I=a(this);ac=1;z();this.blur();return false;}).bind("click",b));var L=a(">.jScrollArrowUp",j);var P=a(">.jScrollArrowDown",j);if(c.arrowSize){m=ab-c.arrowSize-c.arrowSize;Z.css({height:m+"px",top:c.arrowSize+"px"});}else{var h=L.height();c.arrowSize=h;m=ab-h-P.height();Z.css({height:m+"px",top:h+"px"});}}var X=a(this).css({position:"absolute",overflow:"visible"});var e;var y;var D;var f=0;var J=t*ab/2;var E=function(ae,ag){var af=ag=="X"?"Left":"Top";return ae["page"+ag]||(ae["client"+ag]+(document.documentElement["scroll"+af]||document.body["scroll"+af]))||0;};var F=function(){return false;};var W=function(){Q();e=s.offset(false);e.top-=f;y=m-s[0].offsetHeight;D=2*c.wheelSpeed*y/l;};var g=function(p){W();J=E(p,"Y")-f-e.top;a("html").bind("mouseup",w).bind("mousemove",u);if(a.browser.msie){a("html").bind("dragstart",F).bind("selectstart",F);}return false;};var w=function(){a("html").unbind("mouseup",w).unbind("mousemove",u);J=t*ab/2;if(a.browser.msie){a("html").unbind("dragstart",F).unbind("selectstart",F);}};var Y=function(ae){ae=ae<0?0:(ae>y?y:ae);f=ae;s.css({top:ae+"px"});var af=ae/y;r.data("jScrollPanePosition",(ab-l)*-af);X.css({top:((ab-l)*af)+"px"});r.trigger("scroll");if(c.showArrows){L[ae==0?"addClass":"removeClass"]("disabled");P[ae==y?"addClass":"removeClass"]("disabled");}};var u=function(p){Y(E(p,"Y")-e.top-J);};var S=Math.max(Math.min(t*(ab-c.arrowSize*2),c.dragMaxHeight),c.dragMinHeight);s.css({height:S+"px"}).bind("mousedown",g);var N;var K;var k;var V=function(){if(K>8||K%4==0){Y((f-((f-k)/2)));}K++;};var aa=function(){clearInterval(N);a("html").unbind("mouseup",aa).unbind("mousemove",A);};var A=function(p){k=E(p,"Y")-e.top-J;};var x=function(p){W();A(p);K=0;a("html").bind("mouseup",aa).bind("mousemove",A);N=setInterval(V,100);V();return false;};Z.bind("mousedown",x);j.bind("mousewheel",function(ae,ag){W();Q();var af=f;Y(f-ag*D);var p=af!=f;return !p;});var U;var G;function C(){var p=(U-f)/c.animateStep;if(p>1||p<-1){Y(f+p);}else{Y(U);Q();}}var Q=function(){if(G){clearInterval(G);delete U;}};var d=function(ag,af){if(typeof ag=="string"){$e=a(ag,r);if(!$e.length){return;}ag=$e.offset().top-r.offset().top;}j.scrollTop(0);Q();var p=l-ab;ag=ag>p?p:ag;r.data("jScrollPaneMaxScroll",p);var ae=ag/p*y;if(af||!c.animateTo){Y(ae);}else{U=ae;G=setInterval(C,c.animateInterval);}};r[0].scrollTo=d;r[0].scrollBy=function(ae){var p=-parseInt(X.css("top"))||0;d(p+ae);};W();d(-ad,true);a("*",this).bind("focus",function(ag){var ae=a(this);var aj=0;while(ae[0]!=r[0]){aj+=ae.position().top;ae=ae.offsetParent();}var ah=-parseInt(X.css("top"))||0;var ai=ah+ab;var af=aj>ah&&aj<ai;if(!af){var p=aj-c.scrollbarMargin;if(aj>ah){p+=a(this).height()+15+c.scrollbarMargin-ab;}d(p);}});if(location.hash){d(location.hash);}a(document).bind("click",function(ae){$target=a(ae.target);if($target.is("a")){var p=$target.attr("href");if(p&&p.substr(0,1)=="#"){d(p);}}});a.jScrollPane.active.push(r[0]);}else{r.css({height:ab+"px",width:B-this.originalSidePaddingTotal+"px",padding:this.originalPadding});r.parent().unbind("mousewheel");}});};a.fn.jScrollPaneRemove=function(){a(this).each(function(){$this=a(this);var b=$this.parent();if(b.is(".jScrollPaneContainer")){$this.css({top:"",height:"",width:"",padding:"",overflow:"",position:""});b.after($this).remove();}});};a.fn.jScrollPane.defaults={scrollbarWidth:10,scrollbarMargin:5,wheelSpeed:18,showArrows:false,arrowSize:0,animateTo:false,dragMinHeight:1,dragMaxHeight:99999,animateInterval:100,animateStep:3,maintainPosition:true,scrollbarOnLeft:false,reinitialiseOnImageLoad:false};a(window).bind("unload",function(){var c=a.jScrollPane.active;for(var b=0;b<c.length;b++){c[b].scrollTo=c[b].scrollBy=null;}});})(jQuery);$(document).ready(function(){$(".scroll-pane").each(function(b){var a=parseInt($(this).css("max-height"));if((a>0)&&(a>this.scrollHeight)){$(this).height(this.scrollHeight);$(this).css("max-height",null);return;}else{if(a>0){$(this).css("height",a+"px");}}$(this).css("max-height",null);if($("body").hasClass("dir-rtl")){$(this).jScrollPane({showArrows:true,scrollbarWidth:12,scrollbarOnLeft:false});}else{$(this).jScrollPane({showArrows:true,scrollbarWidth:12});}});});$(document).ready(function(){$(".scroll-pane-wide").jScrollPane({showArrows:true,scrollbarWidth:17});});$(document).ready(function(){var d=$("#clubs-league-list");var b=$("#clubsModule");var f=d.attr("class");if(d.length==0){return;}var e=$("#clubList");var a=self.location.pathname.replace(new RegExp("^/([^/]+).*$"),"$1");var c=b.hasClass("section")?b.attr("class").replace(new RegExp("^.+section-"),""):0;var g=function(h){$.getJSON("/"+a+"/scores/club-data",{leagueId:h,sectionId:c},function(l){var n=e.attr("class");columnCount=n.split("-")[1];var j="";var i=l.length;var k=0;for(var m=0;m<i;++m){if((m%columnCount)==0){if(m!=0){j+="</div>";}j+='<div class="line'+k+'">';k=1-k;}club1=l[m];j+='<div><a href="'+club1.url+'"><span>&bull;</span>  '+club1.name+"</a></div>";}e.html(j);});};d.change(function(){g($(this).val());});$.getJSON("/"+a+"/scores/league-data",null,function(k){if(k!=null){for(var i=0,j=k.length;i<j;++i){if(typeof(k[i])=="undefined"){continue;}var h=$("<option></option>").attr("value",k[i].id).text(k[i].name);if(k[i].id==f){h.attr("selected","selected");}d.append(h);}g(f);}});});$(document).ready(function(){var a=$("#searchText");var b=a.css("background-image");a.blur(function(){var c=$(this);if(c.val()==""){c.css("background-image",b);}});$("#goal_account_login").click(function(){Goal.popup.load("/"+Goal.env.edition+"/account/viewlogin",".login_form",this,{size:{width:660,height:"auto"}});});$("#goal_account_register").click(function(){Goal.popup.load("/"+Goal.env.edition+"/account/viewregister",".register_form",this,{size:{width:600,height:"auto"}});});});jQuery(document).ready(function(){jQuery("#MultimediaGalleryNavContainer ul.navlist li a").bind("click",function(){if($(this).parent().hasClass("active")){$(this).blur();return false;}$("#multimediaContentWrapper > div").hide();$("#"+$(this).attr("contentpane")).fadeIn();$("#MultimediaGalleryNavContainer ul.navlist li").removeClass("active");$(this).parent().addClass("active");$(this).blur();return false;});});$("document").ready(function(){searchSrc=$("#IEMC_Search script:eq(1)").attr("src");if(searchSrc){searchSrcPieces=searchSrc.split("/cse/");searchCse=searchSrcPieces[0].slice(-16);searchCx=searchSrcPieces[1].slice(0,11);urlPath=document.URL.toString().split("/",4).join("/");$("#IEMC_Search #search_queries a:contains('sex')").remove();$("#IEMC_Search #search_queries a").each(function(){oldUrl=$(this).attr("href");searchTerm=oldUrl.split("&q=")[1];searchUrl=urlPath+"/search/results?cof=FORID%3A10&cx=partner-pub-"+searchCse+":"+searchCx+"&ie=utf8&q="+searchTerm;$(this).attr("href",searchUrl);});$("#IEMC_Search #search_queries a:gt(14)").remove();}var a=$("#footerSearchText");var b=a.css("background-image");a.blur(function(){var c=$(this);if(c.val()==""){c.css("background-image",b);}});a.focus(function(){$(this).css("background-image","none");});});jQuery(document).ready(function(){jQuery("#top-fifty-players-module a.button").click(function(){jQuery("#top-fifty-players-listing").slideDown();return(false);});jQuery("#top-fifty-players-module a.close-button").click(function(){jQuery("#top-fifty-players-listing").slideUp();return(false);});});jQuery.fn.picotabs=function(b,a){id="#"+this.attr("id");$(id+">div:gt(0)").hide();$(id+">ul>li:first").addClass("current");$(id+">ul>li>a").click(function(){$(id+">ul>li").removeClass("current");$(this).parent().addClass("current");$(this).blur();var d=/([_\-\w]+$)/i;var e=$("#"+d.exec(this.href)[1]);var c=$(id+">div");switch(a){case"slide":c.slideUp(b);e.slideDown(b);break;default:c.hide(b);e.show(b);}return false;});};var switchPartnerTabs=function(){var b=$("#partner_tab_nav li");var a=$("#partner_tab_nav li.current").next();if(b.index(a)<0){a=$(b[0]);}a.children("a").click();};$(document).ready(function(){$("#partner_tabs").picotabs();var a=setInterval("switchPartnerTabs()","5000");$("#partner_tabs").hover(function(){clearInterval(a);},function(){});$("input.partner_search_box").focus(function(){clearInterval(a);});});jQuery(document).ready(function(){$("#rssIcon").click(function(a){$("#rssFormatSelect").slideToggle();a.preventDefault();});$(".rssFormat").click(function(a){$("#rssFormatSelect").slideToggle();});});$(document).ready(function(){$("#pollForm").submit(function(){var b=$("input[type='radio'][name='optionId']");for(var c=0;c<b.length;c++){if(b[c].checked){$.ajax({type:"POST",url:$("#pollForm").attr("action"),data:$("#pollForm").serialize(),success:function(e,d){$("#pollModule div.moduleBottom").remove();$("#ModulePollArea").replaceWith(e);if($("#pollModule").hasClass("framed")){var f=$(window.top.document.getElementById("poll-embed-box"));f.height($("#pollModule").outerHeight());$("a").attr("target","_parent");}}});return false;}}alert($("#pollSelectErrMsg").attr("value"));return false;});if($("#pollModule").hasClass("framed")){var a=$(window.top.document.getElementById("poll-embed-box"));a.height($("#pollModule").outerHeight());$("a").attr("target","_parent");}});jQuery(document).ready(function(){function a(j,g,f,h,e){var d=j.index(f,mycarousel_itemList.length);j.add(f,c(mycarousel_itemList[d-1]));}function b(h,f,e,g,d){h.remove(e);}function c(e){var d=(e.selected==1)?"currentCountry":"";return'<a title="'+e.country+'" href="'+e.link+'"><img src="'+e.url+'" class="'+d+'" alt="'+e.country+'" width="46" height="31" /></a>';}if(document.getElementById("flag-car-ul")){jQuery("#flag-car-ul").jcarousel({scroll:1,wrap:"circular",itemVisibleInCallback:{onBeforeAnimation:a},itemVisibleOutCallback:{onAfterAnimation:b}});}});var Goal=Goal||{};Goal.Tracking={};Goal.Tracking.clickOdds=function(d,g,e,c,b,a){var h=window.location.href;var f=_gat._getTracker("UA-3459197-19");f._setDomainName(".goal.com");f._setCustomVar(1,"match_id",g);f._setCustomVar(2,"bookmaker_id",e);f._setCustomVar(3,"odds_type",c);f._setCustomVar(4,"odds",b);f._setCustomVar(5,"clicked_offer",a);f._trackEvent("Betting","Open Bookmaker Site",e);if(d){window.open(d,"mywindow");}else{window.open(h,"mywindow");}};Goal.Tracking.impression=function(e,c,b,a){var f=window.location.href;var d=_gat._getTracker("UA-3459197-19");d._setDomainName(".goal.com");d._setCustomVar(1,"match_id",e);d._setCustomVar(2,"bookmaker_id",c);d._setCustomVar(3,"odds_type",b);d._setCustomVar(4,"odds",a);d._trackEvent("Betting","Impression",c);};Goal.Tracking.offer_impression=function(a){try{if(_gaq){_gaq.push(["_setAccount","UA-3459197-19"]);_gaq.push(["_setDomainName",".goal.com"]);_gaq.push(["_trackEvent","BettingWidgetOffers","partner_offer",a,1]);}else{throw ("No Google analytics object found");}}catch(b){alert("tracking exception "+b);}};var Goal=Goal||{};Goal.ClickTracker=Goal.ClickTracker||{};Goal.ClickTracker.$=function(b,a){a=a||b;if(typeof Goal.ClickTracker[b]!="undefined"){return false;}Goal.ClickTracker[b]={trackerDesc:a,trackerType:b,clickOn:function(d,c){try{if(_gaq){_gaq.push(["_setAccount","UA-3459197-19"]);_gaq.push(["_setDomainName",".goal.com"]);_gaq.push(["_trackEvent",this.trackerDesc,"click",d]);}else{throw ("No Google analytics object found");}}catch(f){}window.open(c,this.trackerType);}};return true;};Goal.ClickTracker.$apply=function(b,a){$(a).each(function(c,d){if($(d).attr("href")!="#"){$(d).attr("xhref",$(this).attr("href"));$(d).css("cursor","pointer");$(d).removeAttr("href");$(d).removeAttr("target");}$(d).attr("extension",b);$(d).click(function(){Goal.ClickTracker[$(this).attr("extension")].clickOn($(this).attr("title"),$(this).attr("xhref"));return false;});return true;});};Goal.ClickTracker.$auto=function(c,b,a){a=a||c;if(typeof Goal.ClickTracker[c]=="undefined"){Goal.ClickTracker.$(c,a);}Goal.ClickTracker.$apply(c,b);return true;};GOAL_LR_SCROLLER=function(r){try{var h=(typeof(r.truncate)=="undefined")?0:r.truncate;var o=r.inId.substring(1);var v=r.contentPanelWidth;var l=r.panelsPerPage;var d=r.totalPanels;var j=r.scrollCompleteCallback;var i=l*v;var m=$(r.inId);var t=d*v;var y=0;if(h){y=0-t+i;}else{if(t%i){var c=parseInt(t/i)+1;y=0-(c*i)+i;}else{y=0-t+i;}}var g=null;var z=0;var k=0;var f=0;var s=$("body").hasClass("dir-rtl");if(s){$(m).css("right","0px");}else{$(m).css("left","0px");}var q=parseInt(d/l);if(d%l){q++;}function b(e){if(s){$(m).css("right",e+"px");}else{$(m).css("left",e+"px");}}function p(){if(s){var A=$(m).css("right");return parseInt(A.substring(0,A.indexOf("px")));}else{var e=$(m).css("left");return parseInt(e.substring(0,e.indexOf("px")));}}function u(e){if(s){$(m).animate({right:e},z,"swing",j);}else{$(m).animate({left:e},z,"swing",j);}}function n(A){var e=p();var C=Math.abs(e-A);if(C==0){return;}var B=z;if(B==0){B=parseInt((1000*C)/GOAL_LR_SCROLLER.DEFAULT_SPEED);}if(s){$(m).animate({right:A},B,"swing",j);}else{$(m).animate({left:A},B,"swing",j);}}function a(B){var e=p();if(B<0){if(e<=y){return false;}}else{if(e>=0){return false;}}e+=B;var A=true;if(e>=0){e=0;A=false;}if(e<=y){e=y;A=false;}if(B<0){if((k+1)<q){k++;}}else{if(k>0){k--;}}n(e);return A;}function x(A){var e=0-(A*i);if(e<=y){e=y;}k=A;b(e);}this.scrollToStart=function(){return(a(i));};this.scrollToEnd=function(){return(a(0-i));};this.jumpToPage=function(e){x(e);};this.jumpToContentPanel=function(e){if((e>=0)&&(e<=(d-1))){b(0-(v*e));if(e==0){k=0;}else{k=parseInt((e+1)/l);if(((e+1)%l)==0){k--;}}}};this.getScrollPage=function(){return k;};this.getPageCount=function(){return q;};this.restoreView=function(){this.jumpToPage(k);};this.setAlignment=function(e){f=e;};this.getAlignment=function(){return f;};this.isAtStart=function(){return(p()>=0);};this.isAtEnd=function(){return(p()<=y);};this.getId=function(){return o;};this.resetView=function(){var B=(i>t);var C=i-t;var e=0;switch(f){case GOAL_LR_SCROLLER.ALIGN_CENTER:if(B){k=0;e=parseInt(C/2);}else{var A=parseInt(q/2);if(q%2){A++;}if(A==0){A=1;}this.jumpToPage(A-1);return;}break;case GOAL_LR_SCROLLER.ALIGN_LEFT:e=0;break;case GOAL_LR_SCROLLER.ALIGN_RIGHT:if(B){k=0;e=C;}else{this.jumpToPage(q-1);return;}break;}b(e);};this.setAnimationSpeed=function(e){z=e;};}catch(w){}};GOAL_LR_SCROLLER.ALIGN_CENTER=0;GOAL_LR_SCROLLER.ALIGN_LEFT=1;GOAL_LR_SCROLLER.ALIGN_RIGHT=2;GOAL_LR_SCROLLER.DEFAULT_SPEED=250;var GOAL_RESULTS_PANEL_MANAGER=new function GOAL_RESULTS_PANEL_MANAGER(){var b=this;var c=null;var g=null;var d=null;var h=Array();var f=null;var a=null;var e=false;GOAL_RESULTS_PANEL_MANAGER.getInstance=function(){return b;};this.registerNewListData=function(j,i){try{if(j===null){return false;}if(j.length==0){return false;}$(g).append(j);h[i]=this.createNewScroller(i);return true;}catch(k){goal_results_alert("Register list data exception: "+k);return false;}};this.resetControls=function(){try{var i=this.getActiveScroller();if(i){if(i.isAtStart()){if(!($("a",f)).hasClass("disabled")){$("a",f).addClass("disabled");}}else{$("a",f).removeClass("disabled");}}if(i.isAtEnd()){if(!($("a",a)).hasClass("disabled")){$("a",a).addClass("disabled");}}else{$("a",a).removeClass("disabled");}}catch(j){goal_results_alert("reset controls exception: "+j);}};this.createNewScroller=function(i){try{var j=$("#"+i+" li ").length;if(j==0){throw ("No LI elements found in input list");}return new GOAL_LR_SCROLLER({inId:"#"+i,panelsPerPage:GOAL_RESULTS_PANEL_MANAGER.PANELS_PER_PAGE,contentPanelWidth:GOAL_RESULTS_PANEL_MANAGER.CONTENT_WIDTH,totalPanels:j,truncate:true,scrollCompleteCallback:function(){var l=GOAL_RESULTS_PANEL_MANAGER.getInstance();l.clearScrollingActive();l.resetControls();}});}catch(k){goal_results_alert("Create new scroller exception: "+k);return null;}};this.toString=function(){return("GOAL_RESULTS_PANEL_MANAGER");};this.getActiveScroller=function(){if(_activePanelId==null){return null;}if(h[_activePanelId]==undefined){return null;}return(h[_activePanelId]);};this.initializeViewport=function(){try{var j=this.getActiveScroller();var l=$("#"+j.getId());var k=$("li",l).length;var i=($("body").hasClass("dir-rtl"))?GOAL_LR_SCROLLER.ALIGN_RIGHT:GOAL_LR_SCROLLER.ALIGN_LEFT;if(k<GOAL_RESULTS_PANEL_MANAGER.PANELS_PER_PAGE){j.setAlignment(i);j.resetView();}}catch(m){goal_results_alert("intialize viewport exception: "+m);}};this.scrollToContentWithClass=function(j){try{var i=this.getActiveScroller();var k=$("#"+i.getId());var m=null;$("li",k).each(function(n,o){if($(o).hasClass(j)){m=n;return false;}});if(m==null){return;}i.jumpToContentPanel(m);}catch(l){goal_results_alert("scroll to content with class exception: "+l);}};this.startup=function(j){try{var i=$("ul",j);if(i.length==0){throw ("No default results list found");}g=j;_activePanelId=i[0].id;h[_activePanelId]=this.createNewScroller(_activePanelId);this.scrollToContentWithClass("firstMatchToDisplay");}catch(k){goal_results_alert("Panel manager startup exception: "+k);}};this.showResultsByListId=function(l){var j=(typeof(callback)=="undefined")?null:callback;if(l==_activePanelId){return;}var k=h[l];if(k==undefined){this.loadNewList(l);}else{for(var i in h){$("#"+i).hide();}$("#"+l).fadeIn();_activePanelId=l;}};this.loadNewList=function(k){d=k;var j=k.substring(GOAL_RESULTS_PANEL_MANAGER.NAME_PREFIX.length);var i=self.location.pathname.replace(new RegExp("^/([^/]+).*$"),"$1");$.ajax({url:"/"+i+"/site-elements/results-ribbon",data:{competition_id:j},dataType:"html",context:this,success:function(m){if(this.registerNewListData(m,d)){_activePanelId=d;for(var l in h){$("#"+l).hide();}this.scrollToContentWithClass("firstMatchToDisplay");this.resetControls();$("#"+k).fadeIn();this.resetTabs();}},error:function(l){goal_results_show_server_error(l.responseText);}});};this.setScrollingActive=function(){e=true;};this.clearScrollingActive=function(){e=false;};this.isScrollingActive=function(){return e;};this.resetTabs=function(){try{var m=this.getActiveScroller().getId();var j=m.substring(GOAL_RESULTS_PANEL_MANAGER.NAME_PREFIX.length);var k=$("div#ticker-tabs li");for(var l=0;l<k.length;l++){var o=k[l];var n=$(o).attr("id").substring("competitionId-".length);if(n==j){if(!($(o).hasClass("selected"))){$(o).addClass("selected");}}else{$(o).removeClass("selected");}}}catch(p){goal_results_alert("Tab management callback exception: "+p);}};if($("body").hasClass("dir-rtl")){f=$("div#ticker-right");a=$("div#ticker-left");}else{a=$("div#ticker-right");f=$("div#ticker-left");}$("a",f).click(function(i){try{i.preventDefault();if($(i.currentTarget).hasClass("disabled")){return;}var j=GOAL_RESULTS_PANEL_MANAGER.getInstance();if(j.isScrollingActive()){return;}var l=j.getActiveScroller();l.scrollToStart();j.setScrollingActive();j.resetControls();}catch(k){goal_results_alert("End control exception: "+k);}});$("a",a).click(function(i){try{i.preventDefault();if($(i.currentTarget).hasClass("disabled")){return;}var j=GOAL_RESULTS_PANEL_MANAGER.getInstance();if(j.isScrollingActive()){return;}var l=j.getActiveScroller();j.setScrollingActive();l.scrollToEnd();j.resetControls();}catch(k){goal_results_alert("End control exception: "+k);}});return GOAL_RESULTS_PANEL_MANAGER;};GOAL_RESULTS_PANEL_MANAGER.NAME_PREFIX="gl_results_";GOAL_RESULTS_PANEL_MANAGER.CONTENT_WIDTH=131;GOAL_RESULTS_PANEL_MANAGER.PANELS_PER_PAGE=7;$("document").ready(function(){try{var b=$("#ticker-window");if(b.length==0){return;}$("div#ticker-tabs li a").click(function(d){try{var g=GOAL_RESULTS_PANEL_MANAGER.NAME_PREFIX+$(d.currentTarget).attr("targetPanel");var f=GOAL_RESULTS_PANEL_MANAGER.getInstance();f.showResultsByListId(g);f.resetTabs();f.resetControls();d.preventDefault();}catch(h){goal_results_alert("tab exception "+h);}});var a=GOAL_RESULTS_PANEL_MANAGER.getInstance();a.startup(b[0]);a.resetControls();}catch(c){goal_results_alert("Results ribbon page load exception: "+c);}});goal_results_alert=function(a){if(true){alert(a);}};goal_results_show_server_error=function(a){if(false){var b=window.open("","Server error","width=200,height=400");if(b){b.document.write(a);}}};var G_goal_ts_panelsPerPage=5;var G_goal_ts_scrollInProgress=false;$("document").ready(function(){try{if(typeof(GOAL_LR_SCROLLER)=="undefined"){throw ("Goal LR Scroller class not found.");}var q=($("body")).hasClass("dir-rtl")?-1:1;var n=$("#specials_list");if(n){var m=$("#specialsScrollerViewport").width();var c=$("div.specials_text");if(c.length==0){return;}var k=0;var h=true;if(c.length<2){k=$(c[0]).css("width");var p=k.indexOf("px");if(p!=-1){k=k.substring(0,p);}}else{k=($(c[1]).position().left-$(c[0]).position().left)*q;}var a=k*c.length;if(a<=m){h=false;}var o=new GOAL_LR_SCROLLER({inId:"#specials_list",contentPanelWidth:k,panelsPerPage:G_goal_ts_panelsPerPage,totalPanels:c.length,truncate:true,scrollCompleteCallback:function(){G_goal_ts_scrollInProgress=false;}});o.setAnimationSpeed(1500);if(!(h)){goal_sp_disableSliderControls();}var b=o.getScrollPage();var d=o.getPageCount();if($("body").hasClass("dir-rtl")){b=d-b-1;goal_sp_enableButton("#tsRight",false);goal_sp_enableButton("#tsLeft",true);$("#tsLeft a").click(function(e){e.preventDefault();if(G_goal_ts_scrollInProgress){return;}if($(this).hasClass("inactive")){return;}var i=o.scrollToEnd();G_goal_ts_scrollInProgress=true;goal_sp_enableButton("#tsLeft",i);goal_sp_enableButton("#tsRight",true);goal_sp_selectLED(o.getScrollPage());});$("#tsRight a").click(function(e){e.preventDefault();if(G_goal_ts_scrollInProgress){return;}if($(this).hasClass("inactive")){return;}var i=o.scrollToStart();G_goal_ts_scrollInProgress=true;goal_sp_enableButton("#tsRight",i);goal_sp_enableButton("#tsLeft",true);goal_sp_selectLED(o.getScrollPage());});}else{goal_sp_enableButton("#tsRight",true);goal_sp_enableButton("#tsLeft",false);$("#tsLeft a").click(function(e){e.preventDefault();if(G_goal_ts_scrollInProgress){return;}if($(this).hasClass("inactive")){return;}var i=o.scrollToStart();G_goal_ts_scrollInProgress=true;goal_sp_enableButton("#tsLeft",i);goal_sp_enableButton("#tsRight",true);goal_sp_selectLED(o.getScrollPage());});$("#tsRight a").click(function(e){e.preventDefault();if(G_goal_ts_scrollInProgress){return;}if($(this).hasClass("inactive")){return;}var i=o.scrollToEnd();G_goal_ts_scrollInProgress=true;goal_sp_enableButton("#tsRight",i);goal_sp_enableButton("#tsLeft",true);goal_sp_selectLED(o.getScrollPage());});}var g="";var f=null;for(var j=0;j<d;j++){f=(j==b)?" class='selected' ":"";g+="<li "+f+"><a href=''></a></li>";}$("#topSpecialsLEDs").html(g);$("#topSpecialsLEDs a").click(function(e){e.preventDefault();});}}catch(l){}});goal_sp_enableButton=function(a,c){try{var b=$("a",$(a));if($(b).hasClass("inactive")){if(c){$(b).removeClass("inactive");}}else{if(!(c)){$(b).addClass("inactive");}}}catch(d){}};goal_sp_selectLED=function(a){var b=$("#topSpecialsLEDs li");if((a<0)||(a>(b.length-1))){return;}$(b).removeClass("selected");if(!($("body").hasClass("dir-rtl"))){$(b[a]).addClass("selected");}else{$(b[b.length-a-1]).addClass("selected");}};goal_sp_disableSliderControls=function(){$("#specialsScrollControls").hide();};
