/** * zbox - lightbox and zoomer combo for jQuery * * Copyright 2013 Arcitus Solutions Ltd. * http://www.arcitus.co.uk/ * Not to be used without permission. * * Version 1.0.0 - 26th August 2013 * * Developed for jQuery 1.8.2 * */ ;!function(e,t,n){"use strict";var i={margin:10},r={c:null,o:{},s:function(i){r.cin=r.cn.index(this),r.sd=!1,r.r=!0,e(this).blur(),e(n).on("keydown.zbox",function(e){27==e.which||13==e.which?(r.sdn(),e.preventDefault()):37==e.which||38==e.which||8==e.which?(r.p(),e.preventDefault()):(39==e.which||40==e.which||32==e.which)&&(r.n(),e.preventDefault())}),e(t).resize(function(){r.rf(!1)}),r.window=e(t),r.so(),r.li(),i.preventDefault()},so:function(){var t='
';r.ov=e(t).appendTo("body"),r.ov.click(r.sdn),r.ov.animate({opacity:.7},{duration:250,easing:"swing"})},sdn:function(){r.sd=!0,r.sp&&(r.sp.remove(),r.sp=null),r.c&&r.c.animate({opacity:.1},{duration:250,easing:"swing"}),r.ov?r.ov.animate({opacity:.1},{duration:250,easing:"swing",complete:r.sdf}):r.sdf()},sdf:function(){r.sd=!0,r.ov&&(r.ov.remove(),r.ov=null),r.c&&(r.c.remove(),r.c=null),r.sp&&(r.sp.remove(),r.sp=null),r.i=null,r.nil=0,r.ail=!1,e(".zbox-screen").unbind(".zbox"),e(n).off(".zbox")},li:function(){r.i=new Array,r.nil=0,r.ail=!1,r.cn.each(function(){var t=new Image;t.onload=function(){r.sd||(r.nil++,r.nil==r.cn.length&&(r.ail=!0,r.hs(),r.bi(),r.si(),r.sm()))},t.onerror=function(){console&&console.warn("Error loading image "+t.src),r.hs(),r.sdf()};var n=e(this).attr("href"),i=e(this).attr("title");t.src=n,r.i.push({img:t,href:n,title:i})}),r.ail||r.ss()},ss:function(){if(!r.sd){var t='