PATH:
home
/
sparklp6
/
public_html
/
sparklerfilters-org
/
components
/
com_spsimpleportfolio
/
assets
/
js
/*! * Shuffle.js by @Vestride * Categorize, sort, and filter a responsive grid of items. * Dependencies: jQuery 1.9+, Modernizr 2.6.2+ * @license MIT license * @version 3.0.0 */ window.Modernizr=function(t,e,i){function n(t,e){return typeof t===e}function s(t,e){return!!~(""+t).indexOf(e)}function o(t,e){for(var n in t){var o=t[n];if(!s(o,"-")&&d[o]!==i)return"pfx"!=e||o}return!1}function r(t,e,s){for(var o in t){var r=e[t[o]];if(r!==i)return!1===s?t[o]:n(r,"function")?r.bind(s||e):r}return!1}function a(t,e,i){var s=t.charAt(0).toUpperCase()+t.slice(1),a=(t+" "+_.join(s+" ")+s).split(" ");return n(e,"string")||n(e,"undefined")?o(a,e):r(a=(t+" "+g.join(s+" ")+s).split(" "),e,i)}var l,u,h={},p=e.documentElement,f="modernizr",c=e.createElement(f),d=c.style,m=" -webkit- -moz- -o- -ms- ".split(" "),y="Webkit Moz O ms",_=y.split(" "),g=y.toLowerCase().split(" "),v={},C=[],T=C.slice,E=function(t,i,n,s){var o,r,a,l,u=e.createElement("div"),h=e.body,c=h||e.createElement("body");if(parseInt(n,10))for(;n--;)(a=e.createElement("div")).id=s?s[n]:f+(n+1),u.appendChild(a);return o=["­",'<style id="s',f,'">',t,"</style>"].join(""),u.id=f,(h?u:c).innerHTML+=o,c.appendChild(u),h||(c.style.background="",c.style.overflow="hidden",l=p.style.overflow,p.style.overflow="hidden",p.appendChild(c)),r=i(u,t),h?u.parentNode.removeChild(u):(c.parentNode.removeChild(c),p.style.overflow=l),!!r},S={}.hasOwnProperty;for(var b in u=n(S,"undefined")||n(S.call,"undefined")?function(t,e){return e in t&&n(t.constructor.prototype[e],"undefined")}:function(t,e){return S.call(t,e)},Function.prototype.bind||(Function.prototype.bind=function(t){var e=this;if("function"!=typeof e)throw new TypeError;var i=T.call(arguments,1),n=function(){if(this instanceof n){var s=function(){};s.prototype=e.prototype;var o=new s,r=e.apply(o,i.concat(T.call(arguments)));return Object(r)===r?r:o}return e.apply(t,i.concat(T.call(arguments)))};return n}),v.csstransforms=function(){return!!a("transform")},v.csstransforms3d=function(){var t=!!a("perspective");return t&&"webkitPerspective"in p.style&&E("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",(function(e){t=9===e.offsetLeft&&3===e.offsetHeight})),t},v.csstransitions=function(){return a("transition")},v)u(v,b)&&(l=b.toLowerCase(),h[l]=v[b](),C.push((h[l]?"":"no-")+l));return h.addTest=function(t,e){if("object"==typeof t)for(var n in t)u(t,n)&&h.addTest(n,t[n]);else{if(t=t.toLowerCase(),h[t]!==i)return h;e="function"==typeof e?e():e,p.className+=" "+(e?"":"no-")+t,h[t]=e}return h},function(t){d.cssText=t}(""),c=null,h._version="2.6.2",h._prefixes=m,h._domPrefixes=g,h._cssomPrefixes=_,h.testProp=function(t){return o([t])},h.testAllProps=a,h.testStyles=E,h.prefixed=function(t,e,i){return e?a(t,e,i):a(t,"pfx")},p.className=p.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+" js "+C.join(" "),h}(0,this.document),function(t){"function"==typeof define&&define.amd?define(["jquery","modernizr"],t):window.Shuffle=t(window.jQuery,window.Modernizr)}((function(t,e,i){"use strict";function n(t,e,i){for(var n=0,s=t.length;s>n;n++)if(e.call(i,t[n],n,t)==={})return}function s(e,i,n){return setTimeout(t.proxy(e,i),n)}function o(t){return Math.max.apply(Math,t)}function r(e){return t.isNumeric(e)?e:0}if("object"!=typeof e)throw new Error("Shuffle.js requires Modernizr.\nhttp://vestride.github.io/Shuffle/#dependencies");var a=e.prefixed("transition"),l=e.prefixed("transitionDelay"),u=e.prefixed("transitionDuration"),h={WebkitTransition:"webkitTransitionEnd",transition:"transitionend"}[a],p=e.prefixed("transform"),f=function(t){return t?t.replace(/([A-Z])/g,(function(t,e){return"-"+e.toLowerCase()})).replace(/^ms-/,"-ms-"):""}(p),c=e.csstransforms&&e.csstransitions,d=e.csstransforms3d,m="shuffle",y="all",_=.001,g=function(t,e){this.x=r(t),this.y=r(e)};g.equals=function(t,e){return t.x===e.x&&t.y===e.y};var v=0,C=t(window),T=function(e,i){i=i||{},t.extend(this,T.options,i,T.settings),this.$el=t(e),this.element=e,this.unique="shuffle_"+v++,this._fire(T.EventType.LOADING),this._init(),s((function(){this.initialized=!0,this._fire(T.EventType.DONE)}),this,16)};return T.EventType={LOADING:"loading",DONE:"done",LAYOUT:"layout",REMOVED:"removed"},T.ClassName={BASE:m,SHUFFLE_ITEM:"shuffle-item",FILTERED:"filtered",CONCEALED:"concealed"},T.options={group:y,speed:250,easing:"ease-out",itemSelector:"",sizer:null,gutterWidth:0,columnWidth:0,delimeter:null,buffer:0,initialSort:null,throttle:function(e,i,n){var s,o,r,a=null,l=0;n=n||{};var u=function(){l=!1===n.leading?0:t.now(),a=null,r=e.apply(s,o),s=o=null};return function(){var h=t.now();l||!1!==n.leading||(l=h);var p=i-(h-l);return s=this,o=arguments,0>=p||p>i?(clearTimeout(a),a=null,l=h,r=e.apply(s,o),s=o=null):a||!1===n.trailing||(a=setTimeout(u,p)),r}},throttleTime:300,sequentialFadeDelay:150,supported:c},T.settings={useSizer:!1,itemCss:{position:"absolute",top:0,left:0,visibility:"visible"},revealAppendedDelay:300,lastSort:{},lastFilter:y,enabled:!0,destroyed:!1,initialized:!1,_animations:[],styleQueue:[]},T.Point=g,T._getItemTransformString=function(t,e){return d?"translate3d("+t.x+"px, "+t.y+"px, 0) scale3d("+e+", "+e+", 1)":"translate("+t.x+"px, "+t.y+"px) scale("+e+")"},T._getNumberStyle=function(e,i){return T._getFloat(t(e).css(i))},T._getInt=function(t){return r(parseInt(t,10))},T._getFloat=function(t){return r(parseFloat(t))},T._getOuterWidth=function(t,e){var i=t.offsetWidth;e&&(i+=T._getNumberStyle(t,"marginLeft")+T._getNumberStyle(t,"marginRight"));return i},T._getOuterHeight=function(t,e){var i=t.offsetHeight;e&&(i+=T._getNumberStyle(t,"marginTop")+T._getNumberStyle(t,"marginBottom"));return i},T._skipTransition=function(t,e,i){var n=t.style[u];t.style[u]="0ms",e.call(i);t.offsetWidth;t.style[u]=n},T.prototype._init=function(){this.$items=this._getItems(),this.sizer=this._getElementOption(this.sizer),this.sizer&&(this.useSizer=!0),this.$el.addClass(T.ClassName.BASE),this._initItems(),C.on("resize."+m+"."+this.unique,this._getResizeFunction());var t=this.$el.css(["position","overflow"]),e=T._getOuterWidth(this.element);this._validateStyles(t),this._setColumns(e),this.shuffle(this.group,this.initialSort),this.supported&&s((function(){this._setTransitions(),this.element.style[a]="height "+this.speed+"ms "+this.easing}),this)},T.prototype._getResizeFunction=function(){var e=t.proxy(this._onResize,this);return this.throttle?this.throttle(e,this.throttleTime):e},T.prototype._getElementOption=function(t){return"string"==typeof t?this.$el.find(t)[0]||null:t&&t.nodeType&&1===t.nodeType?t:t&&t.jquery?t[0]:null},T.prototype._validateStyles=function(t){"static"===t.position&&(this.element.style.position="relative"),"hidden"!==t.overflow&&(this.element.style.overflow="hidden")},T.prototype._filter=function(t,e){t=t||this.lastFilter,e=e||this.$items;var i=this._getFilteredSets(t,e);return this._toggleFilterClasses(i.filtered,i.concealed),this.lastFilter=t,"string"==typeof t&&(this.group=t),i.filtered},T.prototype._getFilteredSets=function(e,i){var s=t(),o=t();return e===y?s=i:n(i,(function(i){var n=t(i);this._doesPassFilter(e,n)?s=s.add(n):o=o.add(n)}),this),{filtered:s,concealed:o}},T.prototype._doesPassFilter=function(e,i){if(t.isFunction(e))return e.call(i[0],i,this);var n=i.data("groups"),s=this.delimeter&&!t.isArray(n)?n.split(this.delimeter):n;return t.inArray(e,s)>-1},T.prototype._toggleFilterClasses=function(t,e){t.removeClass(T.ClassName.CONCEALED).addClass(T.ClassName.FILTERED),e.removeClass(T.ClassName.FILTERED).addClass(T.ClassName.CONCEALED)},T.prototype._initItems=function(t){(t=t||this.$items).addClass([T.ClassName.SHUFFLE_ITEM,T.ClassName.FILTERED].join(" ")),t.css(this.itemCss).data("point",new g).data("scale",1)},T.prototype._updateItemCount=function(){this.visibleItems=this._getFilteredItems().length},T.prototype._setTransition=function(t){t.style[a]=f+" "+this.speed+"ms "+this.easing+", opacity "+this.speed+"ms "+this.easing},T.prototype._setTransitions=function(t){n(t=t||this.$items,(function(t){this._setTransition(t)}),this)},T.prototype._setSequentialDelay=function(t){this.supported&&n(t,(function(t,e){t.style[l]="0ms,"+(e+1)*this.sequentialFadeDelay+"ms"}),this)},T.prototype._getItems=function(){return this.$el.children(this.itemSelector)},T.prototype._getFilteredItems=function(){return this.$items.filter("."+T.ClassName.FILTERED)},T.prototype._getConcealedItems=function(){return this.$items.filter("."+T.ClassName.CONCEALED)},T.prototype._getColumnSize=function(e,i){var n;return 0===(n=t.isFunction(this.columnWidth)?this.columnWidth(e):this.useSizer?T._getOuterWidth(this.sizer):this.columnWidth?this.columnWidth:this.$items.length>0?T._getOuterWidth(this.$items[0],!0):e)&&(n=e),n+i},T.prototype._getGutterSize=function(e){return t.isFunction(this.gutterWidth)?this.gutterWidth(e):this.useSizer?T._getNumberStyle(this.sizer,"marginLeft"):this.gutterWidth},T.prototype._setColumns=function(t){var e=t||T._getOuterWidth(this.element),i=this._getGutterSize(e),n=this._getColumnSize(e,i),s=(e+i)/n;Math.abs(Math.round(s)-s)<.3&&(s=Math.round(s)),this.cols=Math.max(Math.floor(s),1),this.containerWidth=e,this.colWidth=n},T.prototype._setContainerSize=function(){this.$el.css("height",this._getContainerSize())},T.prototype._getContainerSize=function(){return o(this.positions)},T.prototype._fire=function(t,e){this.$el.trigger(t+"."+m,e&&e.length?e:[this])},T.prototype._resetCols=function(){var t=this.cols;for(this.positions=[];t--;)this.positions.push(0)},T.prototype._layout=function(t,e){n(t,(function(t){this._layoutItem(t,!!e)}),this),this._processStyleQueue(),this._setContainerSize()},T.prototype._layoutItem=function(e,i){var n=t(e),s=n.data(),o=s.point,r=s.scale,a={width:T._getOuterWidth(e,!0),height:T._getOuterHeight(e,!0)},l=this._getItemPosition(a);g.equals(o,l)&&1===r||(s.point=l,s.scale=1,this.styleQueue.push({$item:n,point:l,scale:1,opacity:i?0:1,skipTransition:i,callfront:function(){i||n.css("visibility","visible")},callback:function(){i&&n.css("visibility","hidden")}}))},T.prototype._getItemPosition=function(t){for(var e=this._getColumnSpan(t.width,this.colWidth,this.cols),i=this._getColumnSet(e,this.cols),n=this._getShortColumn(i,this.buffer),s=new g(Math.round(this.colWidth*n),Math.round(i[n])),o=i[n]+t.height,r=this.cols+1-i.length,a=0;r>a;a++)this.positions[n+a]=o;return s},T.prototype._getColumnSpan=function(t,e,i){var n=t/e;return Math.abs(Math.round(n)-n)<.3&&(n=Math.round(n)),Math.min(Math.ceil(n),i)},T.prototype._getColumnSet=function(t,e){if(1===t)return this.positions;for(var i=e+1-t,n=[],s=0;i>s;s++)n[s]=o(this.positions.slice(s,s+t));return n},T.prototype._getShortColumn=function(t,e){for(var i=function(t){return Math.min.apply(Math,t)}(t),n=0,s=t.length;s>n;n++)if(t[n]>=i-e&&t[n]<=i+e)return n;return 0},T.prototype._shrink=function(e){n(e||this._getConcealedItems(),(function(e){var i=t(e),n=i.data();n.scale!==_&&(n.scale=_,this.styleQueue.push({$item:i,point:n.point,scale:_,opacity:0,callback:function(){i.css("visibility","hidden")}}))}),this)},T.prototype._onResize=function(){!this.enabled||this.destroyed||this.isTransitioning||T._getOuterWidth(this.element)!==this.containerWidth&&this.update()},T.prototype._getStylesForTransition=function(t){var e={opacity:t.opacity};return this.supported?e[p]=T._getItemTransformString(t.point,t.scale):(e.left=t.point.x,e.top=t.point.y),e},T.prototype._transition=function(e){var i=this._getStylesForTransition(e);this._startItemAnimation(e.$item,i,e.callfront||t.noop,e.callback||t.noop)},T.prototype._startItemAnimation=function(e,i,n,s){if(n(),!this.initialized)return e.css(i),void s();if(this.supported)e.css(i),e.on(h,(function e(i){i.target===i.currentTarget&&(t(i.target).off(h,e),s())}));else{var o=e.stop(!0).animate(i,this.speed,"swing",s);this._animations.push(o.promise())}},T.prototype._processStyleQueue=function(e){var i=t();n(this.styleQueue,(function(t){t.skipTransition?this._styleImmediately(t):(i=i.add(t.$item),this._transition(t))}),this),i.length>0&&this.initialized?(this.isTransitioning=!0,this.supported?this._whenCollectionDone(i,h,this._movementFinished):this._whenAnimationsDone(this._movementFinished)):e||s(this._layoutEnd,this),this.styleQueue.length=0},T.prototype._styleImmediately=function(t){T._skipTransition(t.$item[0],(function(){t.$item.css(this._getStylesForTransition(t))}),this)},T.prototype._movementFinished=function(){this.isTransitioning=!1,this._layoutEnd()},T.prototype._layoutEnd=function(){this._fire(T.EventType.LAYOUT)},T.prototype._addItems=function(t,e,i){this._initItems(t),this._setTransitions(t),this.$items=this._getItems(),this._shrink(t),n(this.styleQueue,(function(t){t.skipTransition=!0})),this._processStyleQueue(!0),e?this._addItemsToEnd(t,i):this.shuffle(this.lastFilter)},T.prototype._addItemsToEnd=function(t,e){var i=this._filter(null,t).get();this._updateItemCount(),this._layout(i,!0),e&&this.supported&&this._setSequentialDelay(i),this._revealAppended(i)},T.prototype._revealAppended=function(e){s((function(){n(e,(function(e){var i=t(e);this._transition({$item:i,opacity:1,point:i.data("point"),scale:1})}),this),this._whenCollectionDone(t(e),h,(function(){t(e).css(l,"0ms"),this._movementFinished()}))}),this,this.revealAppendedDelay)},T.prototype._whenCollectionDone=function(e,i,n){var s=0,o=e.length,r=this;e.on(i,(function e(a){a.target===a.currentTarget&&(t(a.target).off(i,e),++s===o&&n.call(r))}))},T.prototype._whenAnimationsDone=function(e){t.when.apply(null,this._animations).always(t.proxy((function(){this._animations.length=0,e.call(this)}),this))},T.prototype.shuffle=function(t,e){this.enabled&&!this.isTransitioning&&(t||(t=y),this._filter(t),this._updateItemCount(),this._shrink(),this.sort(e))},T.prototype.sort=function(t){if(this.enabled&&!this.isTransitioning){this._resetCols();var e=t||this.lastSort,i=this._getFilteredItems().sorted(e);this._layout(i),this.lastSort=e}},T.prototype.update=function(t){this.enabled&&!this.isTransitioning&&(t||this._setColumns(),this.sort())},T.prototype.layout=function(){this.update(!0)},T.prototype.appended=function(t,e,i){this._addItems(t,!0===e,!1!==i)},T.prototype.disable=function(){this.enabled=!1},T.prototype.enable=function(t){this.enabled=!0,!1!==t&&this.update()},T.prototype.remove=function(e){e.length&&e.jquery&&(this._toggleFilterClasses(t(),e),this._shrink(e),this.sort(),this.$el.one(T.EventType.LAYOUT+"."+m,t.proxy((function(){e.remove(),this.$items=this._getItems(),this._updateItemCount(),this._fire(T.EventType.REMOVED,[e,this]),e=null}),this)))},T.prototype.destroy=function(){C.off("."+this.unique),this.$el.removeClass(m).removeAttr("style").removeData(m),this.$items.removeAttr("style").removeData("point").removeData("scale").removeClass([T.ClassName.CONCEALED,T.ClassName.FILTERED,T.ClassName.SHUFFLE_ITEM].join(" ")),this.$items=null,this.$el=null,this.sizer=null,this.element=null,this.destroyed=!0},t.fn.shuffle=function(e){var i=Array.prototype.slice.call(arguments,1);return this.each((function(){var n=t(this),s=n.data(m);s?"string"==typeof e&&s[e]&&s[e].apply(s,i):(s=new T(this,e),n.data(m,s))}))},t.fn.sorted=function(e){var n=t.extend({},t.fn.sorted.defaults,e),s=this.get(),o=!1;return s.length?n.randomize?function(t){var e,i,n=t.length;if(!n)return t;for(;--n;)e=t[i=Math.floor(Math.random()*(n+1))],t[i]=t[n],t[n]=e;return t}(s):(t.isFunction(n.by)&&s.sort((function(e,s){if(o)return 0;var r=n.by(t(e)),a=n.by(t(s));return r===i&&a===i?(o=!0,0):a>r||"sortFirst"===r||"sortLast"===a?-1:r>a||"sortLast"===r||"sortFirst"===a?1:0})),o?this.get():(n.reverse&&s.reverse(),s)):[]},t.fn.sorted.defaults={reverse:!1,by:null,randomize:!1},T}));
[-] spsimpleportfolio.js
[edit]
[-] jquery.shuffle.modernizr.min.js
[edit]
[-] featherlight.min.js
[edit]
[+]
..