var sliderPageId,flagLeft=1,flagRight=1,SlideIndex=0,slideValue=896,BTChartColor1="#CEDC01",BTChartColor2="#00B335",Tooltip;SlideIt=function(n){n=="right"?slideRight():slideLeft()};slideRight=function(){var n=$(".slider .sliderContent ul.sliderUl").css("margin-left");n=parseInt(n.split("px",1));n!=0&&flagLeft!=0&&(flagLeft=0,$(".slider .sliderContent ul.sliderUl").stop(!1,!1).animate({"margin-left":n+slideValue+"px"},"slow",function(){var t=calcEq(n-slideValue);t=t<0?-t:t;flagLeft=1}),selectPoint(n+slideValue))};slideLeft=function(){var t=$(".slider .sliderContent ul.sliderUl li.sliderItem").length,i=(t-1)*slideValue,n=$(".slider .sliderContent ul.sliderUl").css("margin-left");n=parseInt(n.split("px",1));n!=-i&&flagRight!=0?(flagRight=0,$(".slider .sliderContent ul.sliderUl").stop(!1,!1).animate({"margin-left":n-slideValue+"px"},"slow",function(){var t=calcEq(n-slideValue);t=t<0?-t:t;flagRight=1}),selectPoint(n-slideValue)):flagRight!=0&&($(".slider .sliderContent ul.sliderUl").stop(!1,!1).animate({"margin-left":"0px"},"slow",function(){var t=calcEq(n-slideValue);t=t<0?-t:t;flagLeft=1}),selectPoint(0))};calcEq=function(n){if(n==0)return 0;var t=n/slideValue;return parseInt(t)};selectPoint=function(n){n=-n;$(".slider .slide_dots ul li").removeClass("active").filter(":eq("+calcEq(n)+")").addClass("active")};showItem=function(n){var t=-(n*slideValue);$(".slider .sliderContent ul.sliderUl").stop(!1,!1).animate({"margin-left":t+"px"},"slow",function(){var n=calcEq(t);n=n<0?-n:n});selectPoint(t)};generateControlButtons=function(){for(var i=$(".slider .sliderContent ul.sliderUl li.sliderItem").length,t="",n=0;n<\/a><\/li>";$(".slide_dots ul").html(t);selectPoint(0)};Tooltip={Defaults:{id:"tt",position:"bottom",top:0,left:0,width:300,maxw:300,speed:10,endalpha:95,alpha:0,classSelector:".score_board_box",name:"Unknown",dataType:1,leagueType:"",mode:"default",maxTeamNameLength:12,sportId:0,languageId:0,showRound:!1,teamId:0,homeTeamId:0,awayTeamId:0,isH2H:!1,isPart:!1},ie:document.all?!0:!1,Instance:function(n){var t=Tooltip.loadSettings(n),i=function(n,i){$.ajax({url:"/Home/GetScoreInfo?languageId={0}&sportId={1}&matchId={2}&teamId={3}".format(t.languageId,t.sportId,i.matchId,t.teamId),dataType:"json",type:"GET",success:function(n){t.isH2H&&(n.Info.Winner=Tooltip.h2hScorebox(n.Info,t));$("#defaultTooltip").tmpl(n).appendTo("#tt")}})},u=function(n,i){$.ajax({url:"/Home/GetScoreInfo?languageId={0}&sportId={1}&matchId={2}&teamId={3}".format(t.languageId,t.sportId,i.matchId,t.teamId),dataType:"json",type:"GET",success:function(n){var i;t.teamId&&(i=[],$.each(n.PartScores.Scores,function(t,r){r.Winner=Tooltip.teamPartScorebox(n.Info,r);i.push(r)}),n.PartScores.Scores=i);t.isPart&&(i=[],$.each(n.PartScores.Scores,function(r,u){u.Winner=Tooltip.h2hPartScorebox(n.Info,t,u);i.push(u)}),n.PartScores.Scores=i);t.isH2H&&(n.Info.Winner=Tooltip.h2hScorebox(n.Info,t));$("#otherSportsTooltip").tmpl(n).appendTo("#tt")}})},f=function(n,i){if(i.value<=0)return!1;$.ajax({url:"/Home/GetSmartLeagueTable?languageId={0}&sportId={1}&tableId={2}&teamId={3}&wdl={4}&leagueTableType={5}&hag={6}".format(t.languageId,t.sportId,t.tableId,i.teamId,i.wdl,t.leagueType,i.hag),dataType:"json",type:"GET",success:function(n){var r={};r.list=n;r.wld=i.wdl;r.tblTableType=t.leagueType;$("#smartLeagueTableWDL").tmpl(r).appendTo("#tt")}})},e=function(n,i){if(i.value<=0)return!1;$.ajax({url:"/Home/GetSmartLeagueTableGoals?languageId={0}&sportId={1}&tableId={2}&teamId={3}&leagueTableType={4}&hag={5}&goalmode={6}".format(t.languageId,t.sportId,t.tableId,i.teamId,t.leagueType,i.hag,i.goalmode),dataType:"json",type:"GET",success:function(n){var t={};t.list=n;t.mode=i.goalmode;$("#smartLeagueTableGoal").tmpl(t).appendTo("#tt")}})},o=function(n,i){if(i.value<=0)return!1;$.ajax({url:"/Home/GetSmartLeagueTablePoints?languageId={0}&sportId={1}&tableId={2}&teamId={3}&leagueTableType={4}&hag={5}".format(t.languageId,t.sportId,t.tableId,i.teamId,t.leagueType,i.hag),dataType:"json",type:"GET",success:function(n){var t={};t.list=n;t.mode="2";$("#smartLeagueTableGoal").tmpl(t).appendTo("#tt")}})},s=function(n,i){if(i.value<=0)return!1;$.ajax({url:"/Home/GetSmartLeagueTableSets?languageId={0}&sportId={1}&tableId={2}&teamId={3}&leagueTableType={4}&hag={5}".format(t.languageId,t.sportId,t.tableId,i.teamId,t.leagueType,i.hag),dataType:"json",type:"GET",success:function(n){var t={};t.list=n;t.mode="2";$("#smartLeagueTableGoal").tmpl(t).appendTo("#tt")}})},h=function(){switch(t.mode){case"default":return i;case"otherSports":return u;case"SLT":return f;case"SLTG":return e;case"SLTP":return o;case"SLTS":return s;default:return i}},r;return Tooltip.hide(t),r=h(),{show:function(n,i){var u=Tooltip.createElement(t);Tooltip.setPosition(n,u,t)!==!1&&(r(n,i),document.body.appendChild(u),$(document).keyup(function(n){n.keyCode==27&&$("#tt").remove()}))}}},loadSettings:function(n){return n==null?$.extend({},Tooltip.Defaults):$.extend(!1,Tooltip.Defaults,n)},splitName:function(n){var t="";return n=$.trim(n),t=n.charAt(0)+".",t+=n.substring(n.lastIndexOf(" "),n.lenght),t.length>12&&(t=t.substring(0,12)+"."),t},cutString:function(n,t){var i=n.length;return i>t&&(n=n.substring(0,n.length-(i-t))+"."),n},hide:function(n){$(document).mouseup(function(t){var i=$("#"+n.id);i.has(t.target).length===0&&i.remove()})},createElement:function(n){var t;return t=document.createElement("div"),t.setAttribute("id",n.id),document.body.appendChild(t),t.style.display="block",t.style.position="absolute",t},setPosition:function(n,t,i){var r=$(n).offset();return r==undefined?!1:(t.style.top=r.top+i.top+"px",t.style.left=r.left+i.left+"px",!0)},arrangeStageSeason:function(n,t){return n.indexOf(t)!=-1?n+" ":t+" Sezonu "+n+" "},teamPartScorebox:function(n,t){return!n||n.Winner==""?"":n.TeamId==n.HomeTeamId&&t.Winner=="home"||n.TeamId==n.AwayTeamId&&t.Winner=="away"?"ourteam":n.TeamId==n.AwayTeamId&&t.Winner=="home"||n.TeamId==n.HomeTeamId&&t.Winner=="away"?"otherteam":"draw"},h2hScorebox:function(n,t){return!n||n.Winner==""?"":n.HomeTeamId==t.homeTeamId&&n.Winner=="home"||n.AwayTeamId==t.homeTeamId&&n.Winner=="away"?"home":n.AwayTeamId==t.awayTeamId&&n.Winner=="away"||n.HomeTeamId==t.awayTeamId&&n.Winner=="home"?"away":"draw"},h2hPartScorebox:function(n,t,i){return!n||n.Winner==""?"":n.HomeTeamId==t.homeTeamId&&i.Winner=="home"||n.AwayTeamId==t.homeTeamId&&i.Winner=="away"?"home":n.AwayTeamId==t.awayTeamId&&i.Winner=="away"||n.HomeTeamId==t.awayTeamId&&i.Winner=="home"?"away":"draw"}};String.prototype.format||(String.prototype.format=function(){var n=arguments;return this.replace(/{(\d+)}/g,function(t,i){return typeof n[i]!="undefined"?n[i]:t})})