/* Copyright (c) 2007-2010 SPIL GAMES.  DO NOT COPY THIS CODE. */
;(function($){$.flashPlayerVersion=function(){var flashVersion,activeX=null,fp6Crash=false,shockwaveFlash='ShockwaveFlash.ShockwaveFlash';if(!(flashVersion=navigator.plugins['Shockwave Flash'])){try{activeX=new ActiveXObject(shockwaveFlash+'.7');}
catch(errorA){try{activeX=new ActiveXObject(shockwaveFlash+'.6');flashVersion=[6,0,21];activeX.AllowScriptAccess='always';}
catch(errorB){if(flashVersion&&flashVersion[0]===6){fp6Crash=true;}}
if(!fp6Crash){try{activeX=new ActiveXObject(shockwaveFlash);}
catch(errorC){flashVersion='X 0,0,0';}}}
if(!fp6Crash&&activeX){try{flashVersion=activeX.GetVariable('$version');}
catch(errorD){}}}
else{flashVersion=flashVersion.description;}
flashVersion=flashVersion.match(/^[A-Za-z\s]*?(\d+)(\.|,)(\d+)(\s+r|\s+d|,)(\d+)/);return[flashVersion[1]*1,flashVersion[3]*1,flashVersion[5]*1];}();$.flashExpressInstaller='/img/expressInstall.swf';$.hasFlashPlayer=($.flashPlayerVersion[0]!==0);$.hasFlashPlayerVersion=function(options){var flashVersion=$.flashPlayerVersion;options=(/string|integer/.test(typeof options))?options.toString().split('.'):options;return(options)?(flashVersion[0]>=(options.major||options[0]||flashVersion[0])&&flashVersion[1]>=(options.minor||options[1]||flashVersion[1])&&flashVersion[2]>=(options.release||options[2]||flashVersion[2])):(flashVersion[0]!==0);};$.flash=function(options){var noflashplayer=false;if(!$.hasFlashPlayer){noflashplayer=true;}
var movieFilename=options.url||'',contentType=options.type||'swf',paramAttributes=options.params||{},buildDOM=document.createElement('body'),aArr,bArr,cArr,dArr,a,b,c,d;options.height=options.height||180;options.width=options.width||320;if(noflashplayer||(options.hasVersion&&!$.hasFlashPlayerVersion(options.hasVersion))){$.extend(options,{id:'SWFObjectExprInst',height:Math.max(options.height,137),width:Math.max(options.width,214)});movieFilename=options.expressInstaller||$.flashExpressInstaller;paramAttributes={flashvars:{MMredirectURL:window.location.href,MMplayerType:($.browser.msie&&$.browser.win)?'ActiveX':'PlugIn',MMdoctitle:document.title.slice(0,47)+' - Flash Player Installation'}};}
if(options.flashvars&&typeof paramAttributes==='object'){$.extend(paramAttributes,{flashvars:options.flashvars});}
for(a in(b=['url','type','expressInstall','hasVersion','params','flashvars'])){delete options[b[a]];}
aArr=[];for(a in options){if(typeof options[a]==='object'){bArr=[];for(b in options[a]){bArr.push(b.replace(/([A-Z])/,'-$1').toLowerCase()+':'+options[a][b]+';');}
options[a]=bArr.join('');}
aArr.push(a+'="'+options[a]+'"');}
options=aArr.join(' ');if(typeof paramAttributes==='object'){aArr=[];for(a in paramAttributes){if(typeof paramAttributes[a]==='object'){bArr=[];for(b in paramAttributes[a]){if(typeof paramAttributes[a][b]==='object'){cArr=[];for(c in paramAttributes[a][b]){if(typeof paramAttributes[a][b][c]==='object'){dArr=[];for(d in paramAttributes[a][b][c]){dArr.push(d.replace(/([A-Z])/,'-$1').toLowerCase()+':'+paramAttributes[a][b][c][d]+';');}
paramAttributes[a][b][c]=dArr.join('');}
cArr.push(c+'{'+paramAttributes[a][b][c]+'}');}
paramAttributes[a][b]=cArr.join('');}
bArr.push(window.escape(b)+'='+window.escape(paramAttributes[a][b]));}
paramAttributes[a]=bArr.join('&amp;');}
aArr.push('<PARAM NAME="'+a+'" VALUE="'+paramAttributes[a]+'">');}
paramAttributes=aArr.join('');}
if(contentType=='swf'){if(!(/style=/.test(options))){options+=' style="vertical-align:text-top;"';}
if(!(/style=(.*?)vertical-align/.test(options))){options=options.replace(/style="/,'style="vertical-align:text-top;');}}
if($.browser.msie){if(contentType=='swf'){options+=' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"';paramAttributes='<PARAM NAME="movie" VALUE="'+movieFilename+'">'+paramAttributes;}else{options+=' classid="clsid:233C1507-6A77-46A4-9443-F871F945D258"';paramAttributes='<PARAM NAME="src" VALUE="'+movieFilename+'">'+paramAttributes;}}
else{if(contentType=='swf'){options+=' type="application/x-shockwave-flash" data="'+movieFilename+'"';}else{options+=' type="application/x-director" data="'+movieFilename+'"';}}
return noflashplayer==true?false:'<OBJECT '+options+'>'+paramAttributes+'</OBJECT>';};$.fn.flash=function(options){if(!$.hasFlashPlayer){return this;}
var a=0,each;while((each=this.eq(a++))[0]){each.html($.flash($.extend({},options)));if(each[0].firstChild.getAttribute('id')==='SWFObjectExprInst'){a=this.length;}}
return this;};}(jQuery));;$(function(){var bestRatedTop10=false;$(".top10bestrated_button").click(function(){if(!bestRatedTop10){jQuery.nTooltipEnabled=false;$('#top10mostplayed_anim').animate({top:-355},1000,"swing",function(){$(this).hide();});$('#top10_bestrated_btn').animate({top:0},1000,"swing",function(){$(this).hide();$(".top10mostplayed_button").attr('id','top10mostplayed');bestRatedTop10=true;jQuery.nTooltipEnabled=true;});}
return false;});$(".top10mostplayed_button").click(function(){if(bestRatedTop10){jQuery.nTooltipEnabled=false;$('#top10mostplayed_anim').show().animate({top:0},1000,"swing");$('#top10_bestrated_btn').show().animate({top:354},1000,"swing",function(){$(".top10mostplayed_button").removeAttr('id');bestRatedTop10=false;jQuery.nTooltipEnabled=true;});}
return false;});$('.gameitems li').hover(function(){$('a',this).css('text-decoration','underline');},function(){$('a',this).css('text-decoration','none');});if(gamelink_tracking_param){$('.content_newbox ul li').each(function(){if(!$.isFunction($(this).find('a:first').attr('onclick'))){$(this).find('a').each(function(){$(this).attr('href',$(this).attr('href')+'?home_new')});};});};});
