// source --> http://jeuxdeguerre3.com/wp-content/themes/balon/js/base2.js (function(n,i,k){i.infinitescroll=function y(B,D,C){this.element=i(C);this._create(B,D)};i.infinitescroll.defaults={loading:{finished:k,finishedMsg:"Congratulations, you've reached the end of the internet.",img:"http://wordpress.oyuntemalari.com/demo1/wp-content/themes/ari/img/daha_fazlasi.GIF",msg:null,msgText:"More Games Loading...",selector:null,speed:"fast",start:k},state:{isDuringAjax:false,isInvalidPage:false,isDestroyed:false,isDone:false,isPaused:false,currPage:1},callback:k,debug:false,behavior:k,binder:i(n),nextSelector:"div.navigation a:first",navSelector:"div.navigation",contentSelector:null,extraScrollPx:150,itemSelector:"div.post",animate:false,pathParse:k,dataType:"html",appendCallback:true,bufferPx:40,errorCallback:function(){},infid:0,pixelsFromNavToBottom:k,path:k};i.infinitescroll.prototype={_binding:function g(D){var B=this,C=B.options;if(!!C.behavior&&this["_binding_"+C.behavior]!==k){this["_binding_"+C.behavior].call(this);return}if(D!=="bind"&&D!=="unbind"){this._debug("Binding value "+D+" not valid");return false}if(D=="unbind"){(this.options.binder).unbind("smartscroll.infscr."+B.options.infid)}else{(this.options.binder)[D]("smartscroll.infscr."+B.options.infid,function(){B.scroll()})}this._debug("Binding",D)},_create:function s(B,F){if(!this._validate(B)){return false}var C=this.options=i.extend(true,{},i.infinitescroll.defaults,B),E=/(.*?\/\/).*?(\/.*)/,D=i(C.nextSelector).attr("href");C.contentSelector=C.contentSelector||this.element;C.loading.selector=C.loading.selector||C.contentSelector;if(!D){this._debug("Navigation selector not found");return}C.path=this._determinepath(D);C.loading.msg=i('
Loading...
'+C.loading.msgText+"
");(new Image()).src=C.loading.img;C.pixelsFromNavToBottom=i(document).height()-i(C.navSelector).offset().top;C.loading.start=C.loading.start||function(){i(C.navSelector).hide();C.loading.msg.appendTo(C.loading.selector).show(C.loading.speed,function(){beginAjax(C)})};C.loading.finished=C.loading.finished||function(){C.loading.msg.fadeOut("normal")};C.callback=function(G,H){if(!!C.behavior&&G["_callback_"+C.behavior]!==k){G["_callback_"+C.behavior].call(i(C.contentSelector)[0],H)}if(F){F.call(i(C.contentSelector)[0],H)}};this._setup()},_debug:function p(){if(this.options.debug){return n.console&&console.log.call(console,arguments)}},_determinepath:function z(C){var B=this.options;if(!!B.behavior&&this["_determinepath_"+B.behavior]!==k){this["_determinepath_"+B.behavior].call(this,C);return}if(!!B.pathParse){this._debug("pathParse manual");return B.pathParse}else{if(C.match(/^(.*?)\b2\b(.*?$)/)){C=C.match(/^(.*?)\b2\b(.*?$)/).slice(1)}else{if(C.match(/^(.*?)2(.*?$)/)){if(C.match(/^(.*?page=)2(\/.*|$)/)){C=C.match(/^(.*?page=)2(\/.*|$)/).slice(1);return C}C=C.match(/^(.*?)2(.*?$)/).slice(1)}else{if(C.match(/^(.*?page=)1(\/.*|$)/)){C=C.match(/^(.*?page=)1(\/.*|$)/).slice(1);return C}else{this._debug("Sorry, we couldn't parse your Next (Previous Posts) URL. Verify your the css selector points to the correct A tag. If you still get this error: yell, scream, and kindly ask for help at infinite-scroll.com.");B.state.isInvalidPage=true}}}}this._debug("determinePath",C);return C},_error:function u(C){var B=this.options;if(!!B.behavior&&this["_error_"+B.behavior]!==k){this["_error_"+B.behavior].call(this,C);return}if(C!=="destroy"&&C!=="end"){C="unknown"}this._debug("Error",C);if(C=="end"){this._showdonemsg()}B.state.isDone=true;B.state.currPage=1;B.state.isPaused=false;this._binding("unbind")},_loadcallback:function c(F,G){var E=this.options,I=this.options.callback,B=(E.state.isDone)?"done":(!E.appendCallback)?"no-append":"append",H;if(!!E.behavior&&this["_loadcallback_"+E.behavior]!==k){this["_loadcallback_"+E.behavior].call(this,F,G);return}switch(B){case"done":this._showdonemsg();return false;break;case"no-append":if(E.dataType=="html"){G="
"+G+"
";G=i(G).find(E.itemSelector)}break;case"append":var D=F.children();if(D.length==0){return this._error("end")}H=document.createDocumentFragment();while(F[0].firstChild){H.appendChild(F[0].firstChild)}this._debug("contentSelector",i(E.contentSelector)[0]);i(E.contentSelector)[0].appendChild(H);G=D.get();break}E.loading.finished.call(i(E.contentSelector)[0],E);if(E.animate){var C=i(n).scrollTop()+i("#infscr-loading").height()+E.extraScrollPx+"px";i("html,body").animate({scrollTop:C},800,function(){E.state.isDuringAjax=false})}if(!E.animate){E.state.isDuringAjax=false}I(this,G)},_nearbottom:function t(){var C=this.options,B=0+i(document).height()-(C.binder.scrollTop())-i(n).height();if(!!C.behavior&&this["_nearbottom_"+C.behavior]!==k){this["_nearbottom_"+C.behavior].call(this);return}this._debug("math:",B,C.pixelsFromNavToBottom);return(B-C.bufferPx-1&&i(C[B]).length===0){this._debug("Your "+B+" found no elements.");return false}return true}},bind:function o(){this._binding("bind")},destroy:function A(){this.options.state.isDestroyed=true;return this._error("destroy")},pause:function e(){this._pausing("pause")},resume:function h(){this._pausing("resume")},retrieve:function b(H){var I=this,C=I.options,K=C.path,E,J,L,B,D,H=H||null,G=(!!H)?H:C.state.currPage;beginAjax=function F(M){M.state.currPage++;I._debug("heading into ajax",K);E=i(M.contentSelector).is("table")?i(""):i("
");L=K.join(M.state.currPage);B=(M.dataType=="html"||M.dataType=="json")?M.dataType:"html+callback";if(M.appendCallback&&M.dataType=="html"){B+="+callback"}switch(B){case"html+callback":I._debug("Using HTML via .load() method");E.load(L+" "+M.itemSelector,null,function N(O){I._loadcallback(E,O)});break;case"html":case"json":I._debug("Using "+(B.toUpperCase())+" via $.ajax() method");i.ajax({url:L,dataType:M.dataType,complete:function N(O,P){D=(typeof(O.isResolved)!=="undefined")?(O.isResolved()):(P==="success"||P==="notmodified");(D)?I._loadcallback(E,O.responseText):I._error("end")}});break}};if(!!C.behavior&&this["retrieve_"+C.behavior]!==k){this["retrieve_"+C.behavior].call(this,H);return}if(C.state.isDestroyed){this._debug("Instance is destroyed");return false}C.state.isDuringAjax=true;C.loading.start.call(i(C.contentSelector)[0],C)},scroll:function f(){var B=this.options,C=B.state;if(!!B.behavior&&this["scroll_"+B.behavior]!==k){this["scroll_"+B.behavior].call(this);return}if(C.isDuringAjax||C.isInvalidPage||C.isDone||C.isDestroyed||C.isPaused){return}if(!this._nearbottom()){return}this.retrieve()},toggle:function x(){this._pausing()},unbind:function m(){this._binding("unbind")},update:function j(B){if(i.isPlainObject(B)){this.options=i.extend(true,this.options,B)}}};i.fn.infinitescroll=function d(D,E){var C=typeof D;switch(C){case"string":var B=Array.prototype.slice.call(arguments,1);this.each(function(){var F=i.data(this,"infinitescroll");if(!F){return false}if(!i.isFunction(F[D])||D.charAt(0)==="_"){return false}F[D].apply(F,B)});break;case"object":this.each(function(){var F=i.data(this,"infinitescroll");if(F){F.update(D)}else{i.data(this,"infinitescroll",new i.infinitescroll(D,E,this))}});break}return this};var w=i.event,r;w.special.smartscroll={setup:function(){i(this).bind("scroll",w.special.smartscroll.handler)},teardown:function(){i(this).unbind("scroll",w.special.smartscroll.handler)},handler:function(E,B){var D=this,C=arguments;E.type="smartscroll";if(r){clearTimeout(r)}r=setTimeout(function(){i.event.handle.apply(D,C)},B==="execAsap"?0:100)}};i.fn.smartscroll=function(B){return B?this.bind("smartscroll",B):this.trigger("smartscroll",["execAsap"])}})(window,jQuery);(function($){$.fn.Hexagon=function(options){var defaults={post:'post'} var options=$.extend(defaults,options);var wrapWidth=$(this)[0].offsetWidth,postWidth=$("."+options.post)[0].offsetWidth,lineNum=Math.floor(wrapWidth/postWidth),lineLimit=Math.floor((wrapWidth-69)/postWidth);$("."+options.post).each(function(index){var _this=$(this);_this.css({'margin-left':'0px'});if(lineLimit==lineNum){var numPer=index%lineNum;if(numPer==0){var linePer=Math.floor(index/lineNum)%2;if(linePer==1){_this.css({'margin-left':'78px'});}}}else{var numPer=index%(lineLimit+lineNum);if(numPer==0){_this.css({'margin-left':'78px'});}};});}})(jQuery);(function($){$.fn.nameHover=function(){$(".post").hover(function(){var b=$(this),a=b.find(".sp_game_name");a.show();$(this).addClass("hover")},function(){var b=$(this),a=b.find(".sp_game_name");a.hide();$(this).removeClass("hover")});}})(jQuery);$(function(){var $container=$('#site-content');$container.infinitescroll({navSelector:'#Pagenav',nextSelector:'#Pagenav a.next',itemSelector:'.post',loading:{finishedMsg:'No More Games...',img:'http://wordpress.oyuntemalari.com/demo1/wp-content/themes/ari/img/daha_fazlasi.GIF'}},function(){$container.Hexagon();$container.nameHover();});$container.Hexagon();$container.nameHover();$(window).resize(function(){$container.Hexagon();});$(".post img").hide();$(".post img").one('load',function(){$(this).fadeIn();}).each(function(){if(this.complete){$(this).trigger('load');}});});