reversion-history-20160413-1[1].js

Bloglog

reversion-history-20160413-1[1].js

(function(g){var o=”.big_review_section .tabs .tab”;var m=o+” .pverdt.date”;var r=”.big_review_section .reviews .review”;var e=”nocurr”;var f=”-rev”;var b=”-tab”;var t=”ptitle”;var h=90;var q;var i;var p;function n(){g(o+”.”+e).css(“cursor”,”pointer”);var u=g(o+”:first”);i=d(u.attr(“id”));p=u.find(“.”+t+”:first”).text();g(r+”.”+e).hide();q=g(o).text().length;g(o+”.”+e+” .ptitle”).html(a());}function a(){var v=g(o).length-1;if(q<=h){return p;}var w=q-h;var u=Math.trunc(w/v);if(w%v!=0){u++;}return p.substr(0,(p.length-u))+”…”;}function s(){var v=g(this);var u=d(v.attr(“id”));if(u==i){return;}g(“#”+i+f).fadeOut(200,function(){g(“#”+u+f).fadeIn({duration:200});});g(o).each(function(w,x){if(g(this).attr(“id”)==v.attr(“id”)){g(this).removeClass(e);g(this).find(“.”+t+”:first”).text(p);}else{g(this).addClass(e);g(this).find(“.”+t+”:first”).html(a());}});g(o).css(“cursor”,”auto”);g(o+”.”+e).css(“cursor”,”pointer”);i=u;}function d(u){return u.replace(b,””).replace(f,””);}function k(u){g(m).each(function(w){var x=g(this).text();var v=l(x);if(v===null){return;}var y=j(v,u);g(this).text(y);});g(m).css(“display”,”inline”);}function c(){if(g(m).length<1){return;}k(g.resCountry);}function j(w,u){var y=w.getFullYear();var z=w.getMonth()+1;var v=w.getDate();if(z<10){z=”0″+z;}if(v<10){v=”0″+v;}var x=[v,z,y];if(u==”US”||u==”BZ”||u==”FM”){x=[z,v,y];}else{if(u==”CN”||u==”KP”||u==”KR”||u==”TW”||u==”HU”||u==”IR”||u==”LT”||u==”JP”){x=[y,z,v];}}return x.join(“/”);}function l(v){v=v||””;if(typeof v!=”string”||v.trim()==””){return null;}var w=v.split(“/”);if(w.length!=3){return null;}var u=new Date(w[2],Number.parseInt(w[1])-1,w[0]);if(isNaN(u.getDate())){return null;}return u;}g(document).ready(function(){if(g(o).length<1){return;}n();g(o).click(s);c();});})(jQuery);