1/*! image-scale v1.3.1 | ©2012-2013 Nicolas BADIA | Licensed under the MIT license */ 2!function(e){e.fn.imageScale=function(a){return this.each(function(){var b=e(this),c=b.data("imageScale");if(!c){b.css("opacity",0);var f=b[0].complete,g=e.extend({},e.fn.imageScale.defaults,"object"==typeof a&&a),h=function(){b.data("imageScale",c=new m(this,g));g.rescaleOnResize&&e(window).resize(function(a){c.scheduleScale()});c.scale(!0);var a=g.callback;"function"===typeof a?a(b,c):a&&"object"===typeof a&&a.target[a.action].apply(a.target,[b,c])};f?h.apply(b[0]):b.load(h)}else if("string"==typeof a)c[a]()})}; 3e.fn.imageScale.defaults={scale:"best-fill",align:"center",parent:null,hideParentOverflow:!0,fadeInDuration:0,rescaleOnResize:!0,callback:null,debug:0};var m=function(a,b){this.options=b;this.element=a;var c=this.$element=e(a);this.elementWidth=c.attr("width")||a.width;this.elementHeight=c.attr("height")||a.height;this.$parent=b.parent?b.parent:e(e(a).parent()[0])};e.fn.imageScale.Constructor=m;m.prototype={NONE:"none",FILL:"fill",BEST_FILL:"best-fill",BEST_FIT:"best-fit",BEST_FIT_DOWN_ONLY:"best-fit-down", 4ALIGN_LEFT:"left",ALIGN_RIGHT:"right",ALIGN_CENTER:"center",ALIGN_TOP:"top",ALIGN_BOTTOM:"bottom",ALIGN_TOP_LEFT:"top-left",ALIGN_TOP_RIGHT:"top-right",ALIGN_BOTTOM_LEFT:"bottom-left",ALIGN_BOTTOM_RIGHT:"bottom-right",constructor:m,scale:function(a){if(!this._isDestroyed){var b=this.options,c=this.$parent,f=this.element,g=this.$element;a&&(b.hideParentOverflow&&c.css({overflow:"hidden"}),g.css({opacity:1}));this._didScheduleScale=!1;if(!b.rescaleOnResize||this._needUpdate()){var h=c.outerWidth(), 5l=c.outerHeight(),e=c.innerWidth(),c=c.innerHeight(),e=h-e,c=l-c,d=g.attr("data-scale"),n=g.attr("data-align"),d=d?d:b.scale,m=n?n:b.align,n=b.fadeInDuration;if(d){this._cacheDestWidth===h&&this._cacheDestHeight===l&&2<b.debug&&console.log("imageScale - DEBUG NOTICE: The parent size hasn't changed: dest width: '"+h+"' - dest height: '"+l+"'.");var p=this.elementWidth=this.elementWidth||f.width,f=this.elementHeight=this.elementHeight||f.height;h&&l&&p&&f?(this._cacheDestWidth=h,this._cacheDestHeight= 6l,b=this._innerFrameForSize(d,m,p,f,h,l),e&&(b.x-=e/2),c&&(b.y-=c/2),g.css({position:"absolute",top:b.y+"px",left:b.x+"px",width:b.width+"px",height:b.height+"px","max-width":"none"}),a&&n&&(g.css({display:"none"}),g.fadeIn(n))):0<b.debug&&console.error("imageScale - DEBUG ERROR: The dimensions are incorrect: source width: '"+p+"' - source height: '"+f+"' - dest width: '"+h+"' - dest height: '"+l+"'.")}else 2<b.debug&&console.log("imageScale - DEBUG NOTICE: The scale property is null.")}}},destroy:function(){this._isDestroyed= 7!0;this.$element.removeData("imageScale")},_innerFrameForSize:function(a,b,c,f,g,h){var e,k,d;d={x:0,y:0,width:g,height:h};if(a===this.FILL)return d;e=g/c;k=h/f;switch(a){case this.BEST_FILL:a=e>k?e:k;break;case this.BEST_FIT:a=e<k?e:k;break;case this.NONE:a=1;break;default:a!==this.BEST_FIT_DOWN_ONLY&&1<this.options.debug&&console.warn("imageScale - DEBUG WARNING: The scale '"+a+"' was not understood."),a=c>g||f>h?e<k?e:k:1}c*=a;f*=a;d.width=Math.round(c);d.height=Math.round(f);switch(b){case this.ALIGN_LEFT:d.x= 80;d.y=h/2-f/2;break;case this.ALIGN_RIGHT:d.x=g-c;d.y=h/2-f/2;break;case this.ALIGN_TOP:d.x=g/2-c/2;d.y=0;break;case this.ALIGN_BOTTOM:d.x=g/2-c/2;d.y=h-f;break;case this.ALIGN_TOP_LEFT:d.x=0;d.y=0;break;case this.ALIGN_TOP_RIGHT:d.x=g-c;d.y=0;break;case this.ALIGN_BOTTOM_LEFT:d.x=0;d.y=h-f;break;case this.ALIGN_BOTTOM_RIGHT:d.x=g-c;d.y=h-f;break;default:b!==this.ALIGN_CENTER&&1<this.options.debug&&console.warn("imageScale - DEBUG WARNING: The align '"+b+"' was not understood."),d.x=g/2-c/2,d.y=h/ 92-f/2}return d},_needUpdate:function(){var a=e(window).height()+" "+e(window).width();return this._lastWindowSize!==a?(this._lastWindowSize=a,!0):!1},scheduleScale:function(){if(!this._didScheduleScale)if(window.requestAnimationFrame){var a=this;this._didScheduleScale=!0;requestAnimationFrame(function(){a.scale()})}else this.scale()},_cacheDestWidth:null,_cacheDestHeight:null,_lastWindowSize:null,_didScheduleScale:null}}(window.jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.