function results_limiter(evt){value=evt.target.value;exp=/(.+)\/(.+)\.html/;exp.exec(document.location);url=RegExp.$1;params=RegExp.$2.split(',');scLatin=params[0];if(params[3])order=params[3];else order="1";newurl=url+"\/"+scLatin+","+"1"+","+value+","+order+".html";document.location=newurl;return}function play_btn_mouseOver(){$('div.play_button').addClass('hover');$('a.play_now').addClass('hover')}function play_btn_mouseOut(){$('div.play_button').removeClass('hover');$('a.play_now').removeClass('hover')}function btnOver(){$('div#sbbtn').addClass('hover');$('div#sbinp').addClass('hover')}function btnOut(){$('div#sbbtn').removeClass('hover');$('div#sbinp').removeClass('hover')}function tooltipd_on(){var description=$(this).data('title');if(description!=""){htmlstr="<div class=\"top\" style=\"background: url('"+$imgPath+"tooltips/plain/tt-top-notail.png') no-repeat scroll center bottom transparent;\"></div>";htmlstr+="<div class=\"middle\" style=\"background: url('"+$imgPath+"tooltips/plain/tt-middle-all.png') repeat-y scroll 0% 0% transparent;\">";htmlstr+="<div class=\"body\">"+description+"</div>";htmlstr+="</div>";htmlstr+="<div class=\"bottom\" style=\"background: url('"+$imgPath+"tooltips/plain/tt-bottom-notail.png') no-repeat scroll 0% 0% transparent;\"></div>";$('div#ntooltip').css('display','block');$('div#ntooltip').css('z-index','99999');$('div#ntooltip').css('position','absolute');$('div#ntooltip').addClass('topLeft');$('div#ntooltip').empty();$('div#ntooltip').prepend(htmlstr)}}function tooltipi_off(){$('#tooltip_thumb').css('display','none')}function tooltipi_on(event){var $title=$(this).data('title');if($title!=""){var $htmlstr="";var $img='<img src="'+$(this).data('img')+'" width="200" height="120" alt="'+$title+'" />';$htmlstr="<div class=\"top\" style=\"background: url('"+$imgPath+"tooltips/thumb/200/tt-top-notail-blue.png') no-repeat scroll center bottom transparent;\"></div>";$htmlstr+="<div class=\"middle\" style=\"background: url('"+$imgPath+"tooltips/thumb/200/tt-middle-all-blue.png') repeat-y scroll 0% 0% transparent;\">";$htmlstr+="<div class=\"body\">";$htmlstr+="<div class=\"prepend\">";$htmlstr+=$img;$htmlstr+="</div>";$htmlstr+=$title;$htmlstr+="</div>";$htmlstr+="</div>";$htmlstr+="<div class=\"bottom\" style=\"background: url('"+$imgPath+"tooltips/thumb/200/tt-bottom-notail-blue.png') no-repeat scroll 0% 0% transparent;\"></div>";$('#tooltip_thumb').css('display','block');$('#tooltip_thumb').css('z-index','99999');$('#tooltip_thumb').css('position','absolute');$('#tooltip_thumb').addClass('topLeft');$('#tooltip_thumb').empty();$('#tooltip_thumb').append($htmlstr)}}function tooltipd_off(){$('#ntooltip').css('display','none')}function tooltipd_mousemove(evt){var $tip=$('#ntooltip');var $x=evt.pageX+8;var $y=evt.pageY+16;$tip.css('left',$x+'px');$tip.css('top',$y+'px')}function tooltipi_mousemove(evt){var $tip=$('#tooltip_thumb');var $x=evt.pageX+8;var $y=evt.pageY+16;$tip.css('left',$x+'px');$tip.css('top',$y+'px')}function tooltip_thumb(){tip=$('#tooltip_thumb')}function like_it(event){event.preventDefault();var $val=$('div#rating').data('gameid');if($val){$('a.icon.happy').css('display','none');$('a.icon.sad').css('display','none');$('div.shaddow_happy').css('display','none');$('div.shaddow_sad').css('display','none');$('div.shaddow_happy_text').css('display','none');$('div.shaddow_sad_text').css('display','none');$('div.message').css('display','block');$('div.rating_votes_total').css('visibility','hidden');$.post($baseDir+'vote.php',{id:$val,like:1})}}function hate_it(event){event.preventDefault();var $val=$('div#rating').data('gameid');if($val){$('a.icon.happy').css('display','none');$('a.icon.sad').css('display','none');$('div.shaddow_happy').css('display','none');$('div.shaddow_sad').css('display','none');$('div.shaddow_happy_text').css('display','none');$('div.shaddow_sad_text').css('display','none');$('div.message').css('display','block');$('div.rating_votes_total').css('visibility','hidden');$.post($baseDir+'vote.php',{id:$val,like:0})}}function error_no_image(){$(this).attr('src',$imgPath+'noimage.gif')}function top10bestrated_click(event){event.preventDefault();$('#top10mostplayed_anim').animate({top:'-227',},300,function(){$('div#top10mostplayed_anim').css('display','none')});$('#top10_bestrated_btn').animate({top:'0',},300,function(){$('div#top10_bestrated_btn').css('display','none')})}function top10mostplayed_button_click(event){event.preventDefault();$('div#top10_bestrated_btn').css('display','block');$('div#top10mostplayed_anim').css('display','block');$('#top10mostplayed_anim').animate({top:'0',},500,function(){});$('#top10_bestrated_btn').animate({top:'227',},500,function(){})}function setup(){$('a.image.tooltipd').each(function(){var $this=$(this);$this.data('title',$this.attr('title'));$this.removeAttr('title')});$('a.tooltipi').each(function(){var $this=$(this);var $thisExp=$this.attr('title').split('|');$this.data('title',$thisExp[0]);$this.data('img',$thisExp[1]);$this.removeAttr('title')});$('.results_limiter').change(results_limiter);$('.play_now').hover(play_btn_mouseOver,play_btn_mouseOut);$("#sbbtn").hover(btnOver,btnOut);$('li').hover(function(){$(this).find('a').css('text-decoration','none')},function(){$(this).find('a').css('text-decoration','none')});$('a.image.tooltipd').hover(tooltipd_on,tooltipd_off);$('a.image.tooltipd').mousemove(tooltipd_mousemove);$('a.image.tooltipd img').error(error_no_image);$('span.tipthumbnail img').error(error_no_image);$('a.tooltipi').hover(tooltipi_on,tooltipi_off);$('a.tooltipi').mousemove(tooltipi_mousemove);$('a.icon.happy').click(like_it);$('a.icon.sad').click(hate_it);$('a.top10bestrated_button').click(top10bestrated_click);$('a#top10').click(top10bestrated_click);$('a.top10mostplayed_button').click(top10mostplayed_button_click)}$(document).ready(function(){setup()});function leereText(thefield){if(thefield.defaultValue==thefield.value)thefield.value=""}
function closePreRollAd(kill)
{	if(kill)
	{document.getElementById("showGameLoadingBox").innerHTML = ""; document.getElementById("showGameLoadingBox").innerHTML = "";}
	else
	{document.getElementById("showGameLoadingBox").style.display = "none"; document.getElementById("showGameLoadingBox").style.visibility = "hidden";}
	document.getElementById("showGameLoadedBox").style.display = "block"; document.getElementById("showGameLoadedBox").style.visibility = "visible";}
