function loadSourceTag(){$(".sourceTag").each(function(n,t){$.ajax({url:isHebrew()+"/home/ItemSource",data:{id:$(this).data("id")},dataType:"html",success:function(n){$(t).prepend(n)},error:function(n,t,i){cLog(n,t,i)}})})}function loadFeatured(){$.ajax({url:isHebrew()+"/home/IndexFeatured",traditional:!0,data:{tagIdArr:$("#featured").data("chosentags")},dataType:"html",success:function(n){$("#featured").append(n).fadeIn(500);checkLazyImgs()},error:function(n,t,i){cLog(n,t,i)}})}function loadTags(){$(".itemTags").each(function(n,t){$.ajax({url:$(this).data("tagsurl"),dataType:"html",success:function(n){$(t).append(n);$(t).fadeIn(300);tagsLoaded=!0},error:function(n,t,i){cLog(n,t,i)}})})}function pagerSuccess(){$(document).scrollTop(0);checkLazyImgs();loadSourceTag();isTagsLoaded()}function isTagsLoaded(){tagsLoaded=!1;sessionStorage.getItem("tagsDisplayed")=="y"&&($("#btnTagDis").prop("checked",!0),loadTags())}function cLog(n,t,i){console.log("AJAX error: "+t+"\nError: "+i+"\nDetail: "+n.responseText)}$(document).ready(function(){$(window).bind("popstate",function(){window.location.href=window.location.href});loadFeatured();loadSourceTag();isTagsLoaded()});$(document).on("click",".pagination li a",function(){$("#paging *:gt(0)").addClass("cursorWait");history.pushState({},null,$(this).attr("href"))});var tagsLoaded=!1;$(document).on("change","#btnTagDis",function(){this.checked?(tagsLoaded?$(".itemTags").fadeIn(300):loadTags(),sessionStorage.setItem("tagsDisplayed","y")):($(".itemTags").fadeOut(300),sessionStorage.setItem("tagsDisplayed","n"))})