(function(n){typeof define=="function"?define(n):typeof YUI=="function"?YUI.add("es5",n):n()})(function(){function s(){}function it(n){return n=+n,n!==n?n=0:n!==0&&n!==1/0&&n!==-(1/0)&&(n=(n>0||-1)*Math.floor(Math.abs(n))),n}function y(n){var t=typeof n;return n===null||t==="undefined"||t==="boolean"||t==="number"||t==="string"}function lt(n){var t,i,r;if(y(n))return n;if((i=n.valueOf,typeof i=="function"&&(t=i.call(n),y(t)))||(r=n.toString,typeof r=="function"&&(t=r.call(n),y(t))))return t;throw new TypeError;}var p,w,c,t,ct,l,a,v,d,g,r,nt,tt,i;Function.prototype.bind||(Function.prototype.bind=function(n){var t=this,r,i;if(typeof t!="function")throw new TypeError("Function.prototype.bind called on incompatible "+t);return r=e.call(arguments,1),i=function(){if(this instanceof i){var u=t.apply(this,r.concat(e.call(arguments)));return Object(u)===u?u:this}return t.apply(n,r.concat(e.call(arguments)))},t.prototype&&(s.prototype=t.prototype,i.prototype=new s,s.prototype=null),i});var f=Function.prototype.call,rt=Array.prototype,u=Object.prototype,e=rt.slice,n=f.bind(u.toString),h=f.bind(u.hasOwnProperty),ut,ft,et,ot,st;if((st=h(u,"__defineGetter__"))&&(ut=f.bind(u.__defineGetter__),ft=f.bind(u.__defineSetter__),et=f.bind(u.__lookupGetter__),ot=f.bind(u.__lookupSetter__)),[1,2].splice(0).length!=2&&(p=Array.prototype.splice,Array.prototype.splice=function(n,t){return arguments.length?p.apply(this,[n===void 0?0:n,t===void 0?this.length-n:t].concat(e.call(arguments,2))):[]}),[].unshift(0)!=1&&(w=Array.prototype.unshift,Array.prototype.unshift=function(){return w.apply(this,arguments),this.length}),Array.isArray||(Array.isArray=function(t){return n(t)=="[object Array]"}),c=Object("a"),t=c[0]!="a"||!(0 in c),Array.prototype.forEach||(Array.prototype.forEach=function(r){var e=i(this),f=t&&n(this)=="[object String]"?this.split(""):e,o=arguments[1],u=-1,s=f.length>>>0;if(n(r)!="[object Function]")throw new TypeError;while(++u<s)u in f&&r.call(o,f[u],u,e)}),Array.prototype.map||(Array.prototype.map=function(r){var e=i(this),f=t&&n(this)=="[object String]"?this.split(""):e,o=f.length>>>0,s=Array(o),h=arguments[1],u;if(n(r)!="[object Function]")throw new TypeError(r+" is not a function");for(u=0;u<o;u++)u in f&&(s[u]=r.call(h,f[u],u,e));return s}),Array.prototype.filter||(Array.prototype.filter=function(r){var o=i(this),f=t&&n(this)=="[object String]"?this.split(""):o,h=f.length>>>0,s=[],e,c=arguments[1],u;if(n(r)!="[object Function]")throw new TypeError(r+" is not a function");for(u=0;u<h;u++)u in f&&(e=f[u],r.call(c,e,u,o)&&s.push(e));return s}),Array.prototype.every||(Array.prototype.every=function(r){var e=i(this),f=t&&n(this)=="[object String]"?this.split(""):e,o=f.length>>>0,s=arguments[1],u;if(n(r)!="[object Function]")throw new TypeError(r+" is not a function");for(u=0;u<o;u++)if(u in f&&!r.call(s,f[u],u,e))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(r){var e=i(this),f=t&&n(this)=="[object String]"?this.split(""):e,o=f.length>>>0,s=arguments[1],u;if(n(r)!="[object Function]")throw new TypeError(r+" is not a function");for(u=0;u<o;u++)if(u in f&&r.call(s,f[u],u,e))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(r){var s=i(this),f=t&&n(this)=="[object String]"?this.split(""):s,o=f.length>>>0,u,e;if(n(r)!="[object Function]")throw new TypeError(r+" is not a function");if(!o&&arguments.length==1)throw new TypeError("reduce of empty array with no initial value");if(u=0,arguments.length>=2)e=arguments[1];else do{if(u in f){e=f[u++];break}if(++u>=o)throw new TypeError("reduce of empty array with no initial value");}while(1);for(;u<o;u++)u in f&&(e=r.call(void 0,e,f[u],u,s));return e}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(r){var o=i(this),e=t&&n(this)=="[object String]"?this.split(""):o,s=e.length>>>0,f,u;if(n(r)!="[object Function]")throw new TypeError(r+" is not a function");if(!s&&arguments.length==1)throw new TypeError("reduceRight of empty array with no initial value");if(u=s-1,arguments.length>=2)f=arguments[1];else do{if(u in e){f=e[u--];break}if(--u<0)throw new TypeError("reduceRight of empty array with no initial value");}while(1);do u in this&&(f=r.call(void 0,f,e[u],u,o));while(u--);return f}),Array.prototype.indexOf&&[0,1].indexOf(1,2)==-1||(Array.prototype.indexOf=function(r){var f=t&&n(this)=="[object String]"?this.split(""):i(this),e=f.length>>>0,u;if(!e)return-1;for(u=0,arguments.length>1&&(u=it(arguments[1])),u=u>=0?u:Math.max(0,e+u);u<e;u++)if(u in f&&f[u]===r)return u;return-1}),Array.prototype.lastIndexOf&&[0,1].lastIndexOf(0,-3)==-1||(Array.prototype.lastIndexOf=function(r){var f=t&&n(this)=="[object String]"?this.split(""):i(this),e=f.length>>>0,u;if(!e)return-1;for(u=e-1,arguments.length>1&&(u=Math.min(u,it(arguments[1]))),u=u>=0?u:e-Math.abs(u);u>=0;u--)if(u in f&&r===f[u])return u;return-1}),!Object.keys){var b=!0,k=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],ht=k.length;for(ct in{toString:null})b=!1;Object.keys=function o(n){var keys,i,t,u,r;if(typeof n!="object"&&typeof n!="function"||n===null)throw new TypeError("Object.keys called on a non-object");o=[];for(i in n)h(n,i)&&o.push(i);if(b)for(t=0,u=ht;t<u;t++)r=k[t],h(n,r)&&o.push(r);return o}}l=-621987552e5,a="-000001",Date.prototype.toISOString&&new Date(l).toISOString().indexOf(a)!==-1||(Date.prototype.toISOString=function(){var t,r,u,n,i;if(!isFinite(this))throw new RangeError("Date.prototype.toISOString called on non-finite value.");for(n=this.getUTCFullYear(),i=this.getUTCMonth(),n+=Math.floor(i/12),i=(i%12+12)%12,t=[i+1,this.getUTCDate(),this.getUTCHours(),this.getUTCMinutes(),this.getUTCSeconds()],n=(n<0?"-":n>9999?"+":"")+("00000"+Math.abs(n)).slice(0<=n&&n<=9999?-4:-6),r=t.length;r--;)u=t[r],u<10&&(t[r]="0"+u);return n+"-"+t.slice(0,2).join("-")+"T"+t.slice(2).join(":")+"."+("000"+this.getUTCMilliseconds()).slice(-3)+"Z"}),v=!1;try{v=Date.prototype.toJSON&&new Date(NaN).toJSON()===null&&new Date(l).toJSON().indexOf(a)!==-1&&Date.prototype.toJSON.call({toISOString:function(){return!0}})}catch(at){}v||(Date.prototype.toJSON=function(){var t=Object(this),r=lt(t),i;if(typeof r=="number"&&!isFinite(r))return null;if(i=t.toISOString,typeof i!="function")throw new TypeError("toISOString property is not callable");return i.call(t)}),(!Date.parse||"Date.parse is buggy")&&(Date=function(n){function t(i,r,u,f,e,o,s){var h=arguments.length,c;return this instanceof n?(c=h==1&&String(i)===i?new n(t.parse(i)):h>=7?new n(i,r,u,f,e,o,s):h>=6?new n(i,r,u,f,e,o):h>=5?new n(i,r,u,f,e):h>=4?new n(i,r,u,f):h>=3?new n(i,r,u):h>=2?new n(i,r):h>=1?new n(i):new n,c.constructor=t,c):n.apply(this,arguments)}function i(n,t){var i=t>1?1:0;return f[t]+Math.floor((n-1969+i)/4)-Math.floor((n-1901+i)/100)+Math.floor((n-1601+i)/400)+365*(n-1970)}var u=new RegExp("^(\\d{4}|[+-]\\d{6})(?:-(\\d{2})(?:-(\\d{2})(?:T(\\d{2}):(\\d{2})(?::(\\d{2})(?:\\.(\\d{3}))?)?(Z|(?:([-+])(\\d{2}):(\\d{2})))?)?)?)?$"),f=[0,31,59,90,120,151,181,212,243,273,304,334,365],r;for(r in n)t[r]=n[r];return t.now=n.now,t.UTC=n.UTC,t.prototype=n.prototype,t.prototype.constructor=t,t.parse=function(t){var r=u.exec(t);if(r){var o=Number(r[1]),e=Number(r[2]||1)-1,s=Number(r[3]||1)-1,a=Number(r[4]||0),h=Number(r[5]||0),c=Number(r[6]||0),l=Number(r[7]||0),w=!r[4]||r[8]?0:Number(new n(1970,0)),v=r[9]==="-"?1:-1,y=Number(r[10]||0),p=Number(r[11]||0),f;return a<(h>0||c>0||l>0?24:25)&&h<60&&c<60&&l<1e3&&e>-1&&e<12&&y<24&&p<60&&s>-1&&s<i(o,e+1)-i(o,e)&&(f=((i(o,e)+s)*24+a+y*v)*60,f=((f+h+p*v)*60+c)*1e3+l+w,-864e13<=f&&f<=864e13)?f:NaN}return n.parse.apply(this,arguments)},t}(Date)),Date.now||(Date.now=function(){return+new Date}),"0".split(void 0,0).length&&(d=String.prototype.split,String.prototype.split=function(n,t){return n===void 0&&t===0?[]:d.apply(this,arguments)}),"".substr&&"0b".substr(-1)!=="b"&&(g=String.prototype.substr,String.prototype.substr=function(n,t){return g.call(this,n<0?(n=this.length+n)<0?0:n:n,t)}),r="\t\n\x0b\f\r   ᠎             　\u2028\u2029﻿",(!String.prototype.trim||r.trim())&&(r="["+r+"]",nt=new RegExp("^"+r+r+"*"),tt=new RegExp(r+r+"*$"),String.prototype.trim=function(){if(this===undefined||this===null)throw new TypeError("can't convert "+this+" to object");return String(this).replace(nt,"").replace(tt,"")}),i=function(n){if(n==null)throw new TypeError("can't convert "+n+" to object");return Object(n)}});var docCookies={getItem:function(n){return!n||!this.hasItem(n)?null:unescape(document.cookie.replace(new RegExp("(?:^|.*;\\s*)"+escape(n).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*"),"$1"))},setItem:function(n,t,i,r,u,f){if(n&&!/^(?:expires|max\-age|path|domain|secure)$/i.test(n)){var e="";if(i)switch(i.constructor){case Number:e=i===Infinity?"; expires=Tue, 19 Jan 2038 03:14:07 GMT":"; max-age="+i;break;case String:e="; expires="+i;break;case Date:e="; expires="+i.toGMTString()}document.cookie=escape(n)+"="+escape(t)+e+(u?"; domain="+u:"")+(r?"; path="+r:"")+(f?"; secure":"")}},removeItem:function(n,t){n&&this.hasItem(n)&&(document.cookie=escape(n)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT"+(t?"; path="+t:""))},hasItem:function(n){return new RegExp("(?:^|;\\s*)"+escape(n).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(document.cookie)},keys:function(){for(var t=document.cookie.replace(/((?:^|\s*;)[^\=]+)(?=;|$)|^\s*|\s*(?:\=[^;]*)?(?:\1|$)/g,"").split(/\s*(?:\=[^;]*)?;\s*/),n=0;n<t.length;n++)t[n]=unescape(t[n]);return t}};window.bidiSides=function(n){return n=="start"?$("body").is(".ltr")?"left":"right":n=="end"?$("body").is(".ltr")?"right":"left":void 0},window.ajaxBaseUrl=$("body").is(".ltr")?"/en":"/he",$(function(){$("label:has(input.input-validation-error)").addClass("label-validation-error"),$(".main-menu .with-submenu").hoverIntent(function(){var n=$(this).find(".submenu-wrp").stop(!0,!0).show(),t=n.css({height:"auto"}).height();n.css({height:0}).animate({height:t},250)},function(){var n=$(this).find(".submenu-wrp").stop(!0,!0);n.animate({height:0},250,function(){n.hide()})}),$("a[data-subtitles-id]").live("click",function(){var n=$(this).attr("data-subtitles-id");return $.get(ajaxBaseUrl+"/booktitle/subtitles/"+n).done(function(n){$(n).dialog({modal:!0,height:550,width:770,resizable:!1})}),!1}),$("a.book-thumbnail").bind("click",function(){return!1}).live("mouseenter",function(){var t=$(this),n=$('<img id="book-preview-hover" />');n.appendTo($("body")).hide().one("load",function(){n.fadeIn(200).position({my:bidiSides("start")+" middle",at:bidiSides("end")+" middle",of:t})}).attr("src",$(this).attr("href"))}).live("mouseleave",function(){$("#book-preview-hover").remove()})}),function(){getCartObject=function(){var n=docCookies.getItem("cart"),t={products:[]};return n&&(t=JSON.parse(n)),t},saveCartObject=function(n){var t=JSON.stringify(n);docCookies.setItem("cart",t,2592e3,"/")},getCartItemsCount=function(n){var t=0;return n.products.forEach(function(n){t+=n.qty}),t},refreshCartDisplay=function(n){$('[data-cart-role="display"]').each(function(){var t=$(this).attr("data-cart-template"),i=getCartItemsCount(n),r=t.replace("{0}",i);$(this).text(r)}),refreshCartPageSums()},animateAddToCart=function(n){var t=$('[data-cart-role="display"]').eq(0);n.effect("transfer",{to:t},1e3)},addGroupToCart=function(n,t){var r=n.is("[data-cart-product-id]")?n:n.find("[data-cart-product-id]"),i=[n.find('[data-cart-role="addtocart"]')[0]];r.each(function(n,r){var e=$(r).find('[data-cart-role="selection"]'),o=$(r).find('[data-cart-role="quantity"]'),h=+$(r).attr("data-cart-product-id"),c=!0,u=1,s,f;e.length>0&&(c=e[0].checked,e[0].checked=!1),o.length>0&&(u=+o.val(),o.val(1)),c&&u>0&&(s=t.products.filter(function(n){return n.id===h}),f={id:h,qty:u},s.length===1?(f=s[0],f.qty+=u):t.products.push(f),i.push(r),$(r).removeClass("selected"))}),saveCartObject(t),i.length>1&&animateAddToCart($(i))},changeProductQuantity=function(n,t,i){var r=n.products.filter(function(n){return n.id===t});r.length==1&&i>0&&(r[0].qty=i)},removeProductFromCart=function(n,t){n.products=n.products.filter(function(n){return n.id!==t})},addToCartButtonClickHandler=function(){var t=$(this).parents('[data-cart-role="group"]').eq(0),n=getCartObject();return addGroupToCart(t,n),refreshCartDisplay(n),!1},removeFromCartButtonClickHandler=function(){var t=+$(this).parents("[data-cart-product-id]").attr("data-cart-product-id"),n=getCartObject();removeProductFromCart(n,t),saveCartObject(n),$(this).parents("[data-cart-product-id]").remove(),refreshCartDisplay(n)},selectionCheckboxChangeHandler=function(){var n=$(this).parents("[data-cart-product-id]");$(this).is(":checked")?n.addClass("selected"):n.removeClass("selected")},quantityInputChangeHandler=function(){var t=$(this).parents("[data-cart-product-id]"),n=t.find('[data-cart-role="selection"]');$(this).val()>0?(t.addClass("selected"),n.length>0&&(n[0].checked=!0)):(t.removeClass("selected"),n.length>0&&(n[0].checked=!1))},formatDecimalNumber=function(n){return n},refreshCartPageSums=function(){var n=$('[data-cart-role="cart"]:not(.empty)'),o=0,u;if(n.length==1){var i=0,f=0,s=+n.attr("data-cart-delivery-price"),h=+n.attr("data-cart-free-delivery-min-amount"),e=Array(0,0,0,0,0),r=0,t=-1;n.find("[data-cart-product-id]").each(function(){var v=0,c=+$(this).attr("data-cart-product-unit-price"),s=+$(this).find('[data-cart-role="product-cart-quantity"]').val(),l=+$(this).attr("data-cart-product-unit-weight"),a=l*s,u=+$(this).attr("data-cart-product-pid"),n,h;if($(this).find('[data-cart-role="product-total-price"]').text(formatDecimalNumber(n)),n=c*s,r=0,!1&&(u<=141238&&u>=141111?t=0:u<=231124&&u>=231101&&(t=1)),t>=0)for(h=0;h<s;h++)e[t]++,t<2&&t>=0&&e[t]%5==0&&r++;n-=c*r,o+=a-l*r,i+=n,f++,$(this).find('[data-cart-role="product-total-price"]').text(formatDecimalNumber(n))}),u=i<h?s:0,i+=u,n.find('[data-cart-role="delivery-price"]').text(formatDecimalNumber(u)),n.find('[data-cart-role="cart-total-price"]').text(formatDecimalNumber(i)),f==0&&n.addClass("empty")}},cartQuantityInputChangeHandler=function(){var n=getCartObject(),t=+$(this).parents("[data-cart-product-id]").attr("data-cart-product-id");changeProductQuantity(n,t,+$(this).val()),saveCartObject(n),refreshCartDisplay(n)},$(function(){var n=getCartObject();refreshCartDisplay(n),$('[data-cart-role="selection"]').live("change",selectionCheckboxChangeHandler),$('[data-cart-role="quantity"]').live("change",quantityInputChangeHandler),$('[data-cart-role="addtocart"]').live("click",addToCartButtonClickHandler),$('[data-cart-role="remove-from-cart"]').live("click",removeFromCartButtonClickHandler),$('[data-cart-role="product-cart-quantity"]').live("change",cartQuantityInputChangeHandler)})}(),function(){function n(n,t,i,r){var u=i-n,f=r-t;return Math.sqrt(u*u+f*f)}$(function(){function y(){var i=jQuery.Deferred(),n=0;return t.find("li").each(function(){var t=$(this).find("img");n++,$(new Image).attr("src",t.attr("src")).load(function(){t.data("width",this.width),t.data("height",this.height),n--,n===0&&i.resolve()})}),i}function p(){t.find("li").each(function(){var n=$(this).find("img");a(n,u),t.removeClass("hidden")})}function l(){e||(e=!0,window.setTimeout(w,15))}function w(){b(),e=!1,o&&(o=!1,l())}function b(){var o=i.offset(),c=t[0].scrollWidth-i.width(),e;if(e=r<=o.top?o.top-r:r>=o.top+i.height()?r-(o.top+i.height()):0,e=e<=f?(f-e)/f:0,c>0){var l=i.width(),p=o.left+l/2,y=(p-s)*(h?-1:1)*e,w=Math.round(y/l*c-c/2);Math.abs(y)<l/2&&t.css(h?"margin-right":"margin-left",w)}t.find("li").each(function(){var t=$(this).offset().left+$(this).outerWidth()/2,i=$(this).offset().top+$(this).outerHeight()/2,f=n(t,i,s,r),e=$(this).find("img"),o=(1-Math.min(1,Math.max(0,f/v)))*(1-u)+u;a(e,o)})}function a(n,t){var r=n.data("width"),i=n.data("height");n.css({width:Math.round(r*t),height:Math.round(i*t),"padding-top":i-Math.round(i*t)})}var i,t,u=.7,v=170,f=65,e=!1,o=!1,s,r,h=$("body").hasClass("rtl"),c;$("#page-index").length>0&&(i=$("#page-index .dock-viewport"),t=$("#page-index .dock"),c=y(),c.done(function(){p(),$(document).bind("mousemove",function(n){t.is(":visible")&&(s=n.pageX,r=n.pageY,o=!0,l())})}),$("#page-index .shelves .caption").hover(function(){$(".over",this).stop().fadeIn("250")},function(){$(".over",this).stop().fadeOut("250")}))})}(),function(){$(function(){var n=$("#content-wrapper > .content > .aside-start > .categories");if(n.length>0){n.children("ul").children("li.active").children("a").children(".arrow").addClass("open disabled");var i=n.children("ul").children("li:not(.active):has(li):not(:has(li.active))"),t=n.children("ul").children("li:has(li.active)"),r=n.children("ul").children("li:not(:has(li))");t.children(".sub").show(),t.children("a").children(".arrow").addClass("open disabled"),r.children("a").children(".arrow").removeClass("open").addClass("disabled"),i.hoverIntent(function(){var n=$(this);n.children(".sub").stop(!0,!0).slideDown(200,function(){n.children("a").children(".arrow").addClass("open")})},function(){var n=$(this);n.children(".sub").stop(!0,!0).slideUp(200,function(){n.children("a").children(".arrow").removeClass("open")})}),n.find("a .arrow").click(function(){var n=$(this);return n.hasClass("disabled")||(n.hasClass("open")?n.parent("a").siblings(".sub").stop(!0,!0).slideUp(200,function(){n.removeClass("open")}):n.parent("a").siblings(".sub").stop(!0,!0).slideDown(200,function(){n.addClass("open")})),!1})}})}(),$(function(){function n(n,t,i,r,u){t.find("a[data-page]").each(function(){$(this).attr("data-page")==u?$(this).addClass("active"):$(this).removeClass("active")});var f=[],e=[];n.find(".item").each(function(n,t){n<i*u||n>=i*(u+1)?f.push(t):e.push(t)}),$(f).find("a div").stop(!0,!0).fadeOut(100).filter(":animated").promise().done(function(){$(f).hide(),$(e).show().find("a div").stop(!0,!0).fadeIn(100),n.find(".inner").removeClass("js")}),u==0?n.find(".arrow-prev").addClass("disabled").fadeTo(200,.3):n.find(".arrow-prev").removeClass("disabled").fadeTo(200,1),r==0||u==r-1?n.find(".arrow-next").addClass("disabled").fadeTo(200,.3):n.find(".arrow-next").removeClass("disabled").fadeTo(200,1),n.attr("data-page",u)}var t=$(".clt-books-gallery[data-items]");t.each(function(){function c(){return new Number(t.attr("data-page"))}function o(){var f=new Number(t.attr("data-page"))+1;f<i&&n(t,r,u,i,f)}function l(){var f=new Number(t.attr("data-page"))-1;f>=0&&n(t,r,u,i,f)}function s(){e!==0&&(e=setTimeout(a,h))}function a(){var f=c();f+1>=i?n(t,r,u,i,0):o(),s()}for(var t=$(this),r=t.find(".pager"),u=new Number(t.attr("data-items")),i=Math.ceil(t.find(".item").length/u),e=t.attr("data-play")=="true"?1:0,h=5e3,f=0;f<i;f++)r.append($('<li><a href="#" data-page="'+f+'"><\/a<\/li>'));r.find("a[data-page]").click(function(){return n(t,r,u,i,new Number($(this).attr("data-page"))),!1}),t.find(".arrow-prev").click(function(){return $(this).is(".disabled")||l(),!1}),t.find(".arrow-next").click(function(){return $(this).is(".disabled")||o(),!1}),n(t,r,u,i,0),s()})}),$(function(){var n=$("#footer .rabanim ul");n.length==1&&(n.find(".quote").css({display:"block",opacity:0}),n.find("li").mouseenter(function(){var n=$(this).find(".quote");n.stop().animate({top:"-75px",opacity:1},400)}).mouseleave(function(){var n=$(this).find(".quote");n.stop().animate({top:"0px",opacity:0},400)}))}),$(function(){$("#page-book-category").length==1&&(location.hash.length>0&&$(location.hash).parent("li").animate({"background-color":"#c7e2f6"},{duration:250,complete:function(){$(this).animate({"background-color":"#f7f3e8"},600)}}),$(".books li .image").hoverIntent(function(){var t=$(this),n=$('<div class="hover-preview"><div class="middle"><img /><\/div><\/div>'),i=n.find("img");n.appendTo($(this)).hide(),i.one("load",function(){n.fadeIn(200).position({my:"middle middle",at:"middle middle",of:t})}).attr("src",$("img",this).attr("data-large"))},function(){$(".hover-preview",this).remove()}))}),$(function(){$("#page-gdoley-isroel").length==1&&$(".gadol").click(function(){var t=$(this).attr("data-id"),n;return $.get(ajaxBaseUrl+"/gdoleyisroel/gadol/"+t).done(function(t){n=$(t),n.dialog({modal:!0,height:420,width:760,resizable:!1}),n.find(".carousel").carousel({pagination:!1,itemsPerTransition:3})}),!1})}),function(n){function r(i,r){var u=t.attr("data-background");n("<img />").load(function(){var i={width:n(this).width(),height:n(this).height()},t;n(this).addClass("bg-image"),t={width:n(this).width(),height:n(this).height()},r(i,t)}).attr("src",u).prependTo(i)}function u(r,u,f){t.find("li").each(function(){var e,o,s,h;if(n(this).addClass("edit-demo-remark").prependTo("body"),e=n(this).attr("data-position").split(" "),e.length==2){var c=+e[0]*f,l=+e[1]*f,t=45*f;n(this).is("[data-radius]")&&(t=+n(this).attr("data-radius")*f),o=u.circle(c,l,t),o.attr("fill","#ffff00"),o.attr("stroke-width",0),s=n("<div class='overlay' />").css({left:c-t,top:l-t,width:t*2,height:t*2}).appendTo(r),n(this).position({my:"center bottom",at:"center center-15px",of:s,within:r,collision:"none"}).hide(),h=this,n(s).hoverIntent(function(){n(h).stop(!0,!0).fadeIn()},function(){n(h).stop(!0,!0).fadeOut()}),i(o,t)}})}function i(n,t){n.animate({transform:"s0.7"},500,"linear",function(){f(n,t)})}function f(n,t){n.animate({transform:"s1"},500,">",function(){i(n,t)})}var t,e=Raphael.animation({transform:"s1.5"},1e3,"backIn").repeat(Infinity);n(function(){if(t=n("ul.remarks"),t.length==1){var f=t.parent(),i=n('<div class="edit-demo" />').append(t);n('<div class="edit-demo-wrapper" />').append(i).appendTo(f),r(i,function(t,r){var e=r.width/t.width,f=Raphael(i[0],0,0,r.width,r.height),o=n(f.canvas);o.removeAttr("style").removeAttr("width").removeAttr("height").css({width:r.width,height:r.height}),u(i,f,e)})}})}($)