(function(a){"use strict";a.fn.sfShutter=function(b){var c=a.extend(true,{},a.fn.sfShutter.defaults,b);var d=this,e=null,f=null,g=-1,h=false,i=false,j=function(b){g=a.inArray(b,d);m();f=a('
').attr(c.wrapperAttr).css(c.wrapperCSS).appendTo('body');a('').attr('src',b.href).css(c.imgCSS).appendTo(f).load(k);f.fadeIn(c.speed);f.click(function(b){if(a(this).is(b.target))o();});},k=function(){var b=a('
').addClass('sfShutterControls').css(c.controlsCSS).prependTo(f);l();b.fadeIn(c.speed);a(window).on('resize.sfShutter',l).on('keyup',function(a){if(e)if(a.keyCode===39)n(g+1);else if(a.keyCode===37)n(g-1);else if(a.keyCode===27)o();});b.find('a.sfShutterLeft').on('click',function(a){a.preventDefault();n(g-1);});b.find('a.sfShutterRight').on('click',function(a){a.preventDefault();n(g+1);});},l=function(a,b){var e=(b&&b.length?b:f.find('img')),h=f.find('.sfShutterControls'),i=e.height()+parseInt(c.imgCSS['border-width'])*2,j=e.width()+parseInt(c.imgCSS['border-width'])*2,k=parseInt(h.css('padding-top'))+parseInt(h.css('border-top-width')),l=e.offset().left-f.offset().left-k,m=e.offset().top-f.offset().top-k;if(b&&b.length)h.animate({left:l,top:m,height:i,width:j},c.speed);else h.css({left:l,top:m,height:i,width:j});h.find('a').show();if(!c.loop&&g==0)h.find('.sfShutterLeft').hide();if(!c.loop&&g===d.length-1)h.find('.sfShutterRight').hide();},m=function(){e=a('
').attr(c.overlayAttr).css(c.overlayCSS).appendTo('body').fadeIn(c.speed);e.click(o);},n=function(b){if(h)return;if(i)return;if(b<0||b>=d.length)return;i=true;var e=a('
').attr(c.wrapperAttr).css(c.wrapperCSS).addClass('temp').appendTo('body');var j=a('').css(c.imgCSS).appendTo(e).load(function(){e.fadeIn(c.speed,function(){f.append(j);e.remove();});g=b;l(null,j);f.find('img').first().fadeOut(c.speed,function(){a(this).remove();i=false;});}).attr('src',d[b].href);},o=function(){h=true;e.fadeOut(c.speed,function(){e.remove();e=null;c.onClose.call(this);});f.fadeOut(c.speed,function(){f.remove();f=null;h=false;});a(window).off('resize.sfShutter');};d.click(function(a){a.preventDefault();j(this);});this.switchSlide=n;return this;};a.fn.sfShutter.defaults={overlayAttr:{'class':'sfShutterOverlay'},overlayCSS:{'background':'black','display':'none','height':'100%','opacity':'0.8','filter':'alpha(opacity=80)','position':'fixed','top':'0','width':'100%','z-index':'10000'},wrapperAttr:{'class':'sfShutterWrapper'},wrapperCSS:{'bottom':'70px','display':'none','left':'30px','position':'fixed','right':'30px','top':'70px','z-index':'10000','user-select':'none','-o-user-select':'none','-moz-user-select':'none','-khtml-user-select':'none','-webkit-user-select':'none'},controlsCSS:{'border':'4px solid #70c244','border-radius':'5px','display':'none','height':'100%','left':'0','padding':'16px','position':'absolute','top':'0','width':'100%'},imgCSS:{'border-color':'white','border-width':'18px','border-style':'solid','border-radius':'5px','display':'block','height':'auto','margin':'-18px auto 0','max-height':'100%','max-width':'100%','padding':'0','position':'relative','width':'auto'},exclude:[],speed:500,loop:false,onClose:function(){}};}(jQuery));jQuery(function(a){var b=function(){var b=[];a('a[class]').each(function(){if(this.className.toLowerCase().indexOf('shutterset')!=-1){var c=this.className.toLowerCase().split(/\s+/);for(var d=0;d