Вход Регистрация
Файл: CloudBox-main/doc/js/nimble.js
Строк: 878
<?php
/**
 * Isotope v1.5.21
 * An exquisite jQuery plugin for magical layouts
 * http://isotope.metafizzy.co
 *
 * Commercial use requires one-time license fee
 * http://metafizzy.co/#licenses
 *
 * Copyright 2012 David DeSandro / Metafizzy
 */
(function (abc) {
    
"use strict";
    var 
a.document,
        
a.Modernizr,
        
= function (a) {
            return 
a.charAt(0).toUpperCase() + a.slice(1)
        }, 
"Moz Webkit O Ms".split(" "),
        
= function (a) {
            var 
d.documentElement.style,
                
c;
            if (
typeof b[a] == "string") return a;
            
f(a);
            for (var 
0g.lengthhe++) {
                
g[e] + a;
                if (
typeof b[c] == "string") return c
            
}
        }, 
h("transform"),
        
h("transitionProperty"),
        
= {
            
csstransforms: function () {
                return !!
i
            
},
            
csstransforms3d: function () {
                var 
= !! h("perspective");
                if (
a) {
                    var 
" -o- -moz- -ms- -webkit- -khtml- ".split(" "),
                        
"@media (" c.join("transform-3d),(") + "modernizr)",
                        
b("<style>" "{#modernizr{height:3px}}" "</style>").appendTo("head"),
                        
b('<div id="modernizr" />').appendTo("html");
                    
f.height() === 3f.remove(), e.remove()
                }
                return 
a
            
},
            
csstransitions: function () {
                return !!
j
            
}
        }, 
l;
    if (
e)
        for (
l in ke.hasOwnProperty(l) || e.addTest(lk[l]);
    else {
        
a.Modernizr = {
            
_version"1.6ish: miniModernizr for Isotope"
        
};
        var 
" ",
            
n;
        for (
l in kk[l](), e[l] = n+= " " + ("" "no-") + l;
        
b("html").addClass(m)
    } if (
e.csstransforms) {
        var 
e.csstransforms3d ? {
            
translate: function (a) {
                return 
"translate3d(" a[0] + "px, " a[1] + "px, 0) "
            
},
            
scale: function (a) {
                return 
"scale3d(" ", " ", 1) "
            
}
        } : {
            
translate: function (a) {
                return 
"translate(" a[0] + "px, " a[1] + "px) "
            
},
            
scale: function (a) {
                return 
"scale(" ") "
            
}
        }, 
= function (acd) {
                var 
b.data(a"isoTransform") || {}, = {}, g= {}, j;
                
f[c] = db.extend(ef);
                for (
g in ee[g], h[g] = o[g](j);
                var 
h.translate || "",
                    
h.scale || "",
                    
l;
                
b.data(a"isoTransform"e), a.style[i] = m
            
};
        
b.cssNumber.scale = !0b.cssHooks.scale = {
            
set: function (ab) {
                
p(a"scale"b)
            },
            
get: function (ac) {
                var 
b.data(a"isoTransform");
                return 
&& d.scale d.scale 1
            
}
        }, 
b.fx.step.scale = function (a) {
            
b.cssHooks.scale.set(a.elema.now a.unit)
        }, 
b.cssNumber.translate = !0b.cssHooks.translate = {
            
set: function (ab) {
                
p(a"translate"b)
            },
            
get: function (ac) {
                var 
b.data(a"isoTransform");
                return 
&& d.translate d.translate : [00]
            }
        }
    }
    var 
qr;
    
e.csstransitions && (= {
        
WebkitTransitionProperty"webkitTransitionEnd",
        
MozTransitionProperty"transitionend",
        
OTransitionProperty"oTransitionEnd otransitionend",
        
transitionProperty"transitionend"
    
}[j], h("transitionDuration"));
    var 
b.event,
        
t;
    
s.special.smartresize = {
        
setup: function () {
            
b(this).bind("resize"s.special.smartresize.handler)
        },
        
teardown: function () {
            
b(this).unbind("resize"s.special.smartresize.handler)
        },
        
handler: function (ab) {}
    }, 
b.fn.smartresize = function (a) {
        return 
this.bind("smartresize"a) : this.trigger("smartresize", ["execAsap"])
    }, 
b.Isotope = function (acd) {
        
this.element b(c), this._create(a), this._init(d)
    };
    var 
= ["width""height"],
        
b(a);
    
b.Isotope.settings = {
        
resizable: !0,
        
layoutMode"masonry",
        
containerClass"isotope",
        
itemClass"isotope-item",
        
hiddenClass"isotope-hidden",
        
hiddenStyle: {
            
opacity0,
            
scale.001
        
},
        
visibleStyle: {
            
opacity1,
            
scale1
        
},
        
containerStyle: {
            
position"relative",
            
overflow"hidden"
        
},
        
animationEngine"best-available",
        
animationOptions: {
            
queue: !1,
            
duration800
        
},
        
sortBy"original-order",
        
sortAscending: !0,
        
resizesContainer: !0,
        
transformsEnabled: !0,
        
itemPositionDataEnabled: !1
    
}, b.Isotope.prototype = {
        
_create: function (a) {
            
this.options b.extend({}, b.Isotope.settingsa), this.styleQueue = [], this.elemCount 0;
            var 
this.element[0].style;
            
this.originalStyle = {};
            var 
u.slice(0);
            for (var 
e in this.options.containerStyled.push(e);
            for (var 
0d.lengthgf++) d[f], this.originalStyle[e] = c[e] || "";
            
this.element.css(this.options.containerStyle), this._updateAnimationEngine(), this._updateUsingTransforms();
            var 
= {
                
"original-order": function (ab) {
                    return 
b.elemCount++, b.elemCount
                
},
                
random: function () {
                    return 
Math.random()
                }
            };
            
this.options.getSortData b.extend(this.options.getSortDatah), this.reloadItems(), this.offset = {
                
leftparseInt(this.element.css("padding-left") || 010),
                
topparseInt(this.element.css("padding-top") || 010)
            };
            var 
this;
            
setTimeout(function () {
                
i.element.addClass(i.options.containerClass)
            }, 
0), this.options.resizable && v.bind("smartresize.isotope", function () {
                
i.resize()
            }), 
this.element.delegate("." this.options.hiddenClass"click", function () {
                return !
1
            
})
        },
        
_getAtoms: function (a) {
            var 
this.options.itemSelector,
                
a.filter(b).add(a.find(b)) : a,
                
= {
                    
position"absolute"
                
};
            return 
this.usingTransforms && (d.left 0d.top 0), c.css(d).addClass(this.options.itemClass), this.updateSortData(c, !0), c
        
},
        
_init: function (a) {
            
this.$filteredAtoms this._filter(this.$allAtoms), this._sort(), this.reLayout(a)
        },
        
option: function (a) {
            if (
b.isPlainObject(a)) {
                
this.options b.extend(!0this.optionsa);
                var 
c;
                for (var 
d in a"_update" f(d), this[c] && this[c]()
            }
        },
        
_updateAnimationEngine: function () {
            var 
this.options.animationEngine.toLowerCase().replace(/[ _-]/g""),
                
b;
            switch (
a) {
            case 
"css":
            case 
"none":
                
= !1;
                break;
            case 
"jquery":
                
= !0;
                break;
            default:
                
= !e.csstransitions
            
}
            
this.isUsingJQueryAnimation bthis._updateUsingTransforms()
        },
        
_updateTransformsEnabled: function () {
            
this._updateUsingTransforms()
        },
        
_updateUsingTransforms: function () {
            var 
this.usingTransforms this.options.transformsEnabled && e.csstransforms && e.csstransitions && !this.isUsingJQueryAnimation;
            
|| (delete this.options.hiddenStyle.scaledelete this.options.visibleStyle.scale), this.getPositionStyles this._translate this._positionAbs
        
},
        
_filter: function (a) {
            var 
this.options.filter === "" "*" this.options.filter;
            if (!
b) return a;
            var 
this.options.hiddenClass,
                
"." c,
                
a.filter(d),
                
e;
            if (
!== "*") {
                
e.filter(b);
                var 
a.not(d).not(b).addClass(c);
                
this.styleQueue.push({
                    
$elg,
                    
stylethis.options.hiddenStyle
                
})
            }
            return 
this.styleQueue.push({
                
$elf,
                
stylethis.options.visibleStyle
            
}), f.removeClass(c), a.filter(b)
        },
        
updateSortData: function (ac) {
            var 
this,
                
this.options.getSortData,
                
fg;
            
a.each(function () {
                
b(this), = {};
                for (var 
a in e)!&& === "original-order" g[a] = b.data(this"isotope-sort-data")[a] : g[a] = e[a](fd);
                
b.data(this"isotope-sort-data"g)
            })
        },
        
_sort: function () {
            var 
this.options.sortBy,
                
this._getSorter,
                
this.options.sortAscending : -1,
                
= function (de) {
                    var 
b(da),
                        
b(ea);
                    return 
=== && !== "original-order" && (b(d"original-order"), b(e"original-order")), (? -0) * c
                
};
            
this.$filteredAtoms.sort(d)
        },
        
_getSorter: function (ac) {
            return 
b.data(a"isotope-sort-data")[c]
        },
        
_translate: function (ab) {
            return {
                
translate: [ab]
            }
        },
        
_positionAbs: function (ab) {
            return {
                
lefta,
                
topb
            
}
        },
        
_pushPosition: function (abc) {
            
Math.round(this.offset.left), Math.round(this.offset.top);
            var 
this.getPositionStyles(bc);
            
this.styleQueue.push({
                
$ela,
                
styled
            
}), this.options.itemPositionDataEnabled && a.data("isotope-item-position", {
                
xb,
                
yc
            
})
        },
        
layout: function (ab) {
            var 
this.options.layoutMode;
            
this["_" "Layout"](a);
            if (
this.options.resizesContainer) {
                var 
this["_" "GetContainerSize"]();
                
this.styleQueue.push({
                    
$elthis.element,
                    
styled
                
})
            }
            
this._processStyleQueue(ab), this.isLaidOut = !0
        
},
        
_processStyleQueue: function (ac) {
            var 
this.isLaidOut this.isUsingJQueryAnimation "animate" "css" "css",
                
this.options.animationOptions,
                
this.options.onLayout,
                
hijk;
            
= function (ab) {
                
b.$el[d](b.stylef)
            };
            if (
this._isInserting && this.isUsingJQueryAnimation= function (ab) {
                
b.$el.hasClass("no-transition") ? "css" db.$el[h](b.stylef)
            };
            else if (
|| || f.complete) {
                var 
= !1,
                    
= [cgf.complete],
                    
this;
                
= !0= function () {
                    if (
l) return;
                    var 
b;
                    for (var 
0m.lengthdc++) m[c], typeof b == "function" && b.call(n.elementan);
                    
= !0
                
};
                if (
this.isUsingJQueryAnimation && === "animate"f.complete k= !1;
                else if (
e.csstransitions) {
                    var 
0,
                        
this.styleQueue[0],
                        
&& p.$el,
                        
t;
                    while (!
|| !s.length) {
                        
this.styleQueue[o++];
                        if (!
t) return;
                        
t.$el
                    
}
                    var 
parseFloat(getComputedStyle(s[0])[r]);
                    
&& (= function (ab) {
                        
b.$el[d](b.stylef).one(qk)
                    }, 
= !1)
                }
            }
            
b.each(this.styleQueuei), && k(), this.styleQueue = []
        },
        
resize: function () {
            
this["_" this.options.layoutMode "ResizeChanged"]() && this.reLayout()
        },
        
reLayout: function (a) {
            
this["_" this.options.layoutMode "Reset"](), this.layout(this.$filteredAtomsa)
        },
        
addItems: function (ab) {
            var 
this._getAtoms(a);
            
this.$allAtoms this.$allAtoms.add(c), && b(c)
        },
        
insert: function (ab) {
            
this.element.append(a);
            var 
this;
            
this.addItems(a, function (a) {
                var 
c._filter(a);
                
c._addHideAppended(d), c._sort(), c.reLayout(), c._revealAppended(db)
            })
        },
        
appended: function (ab) {
            var 
this;
            
this.addItems(a, function (a) {
                
c._addHideAppended(a), c.layout(a), c._revealAppended(ab)
            })
        },
        
_addHideAppended: function (a) {
            
this.$filteredAtoms this.$filteredAtoms.add(a), a.addClass("no-transition"), this._isInserting = !0this.styleQueue.push({
                
$ela,
                
stylethis.options.hiddenStyle
            
})
        },
        
_revealAppended: function (ab) {
            var 
this;
            
setTimeout(function () {
                
a.removeClass("no-transition"), c.styleQueue.push({
                    
$ela,
                    
stylec.options.visibleStyle
                
}), c._isInserting = !1c._processStyleQueue(ab)
            }, 
10)
        },
        
reloadItems: function () {
            
this.$allAtoms this._getAtoms(this.element.children())
        },
        
remove: function (ab) {
            
this.$allAtoms this.$allAtoms.not(a), this.$filteredAtoms this.$filteredAtoms.not(a);
            var 
this,
                
= function () {
                    
a.remove(), && b.call(c.element)
                };
            
a.filter(":not(." this.options.hiddenClass ")").length ? (this.styleQueue.push({
                
$ela,
                
stylethis.options.hiddenStyle
            
}), this._sort(), this.reLayout(d)) : d()
        },
        
shuffle: function (a) {
            
this.updateSortData(this.$allAtoms), this.options.sortBy "random"this._sort(), this.reLayout(a)
        },
        
destroy: function () {
            var 
this.usingTransforms,
                
this.options;
            
this.$allAtoms.removeClass(b.hiddenClass " " b.itemClass).each(function () {
                var 
this.style;
                
b.position ""b.top ""b.left ""b.opacity ""&& (b[i] = "")
            });
            var 
this.element[0].style;
            for (var 
d in this.originalStylec[d] = this.originalStyle[d];
            
this.element.unbind(".isotope").undelegate("." b.hiddenClass"click").removeClass(b.containerClass).removeData("isotope"), v.unbind(".isotope")
        },
        
_getSegments: function (a) {
            var 
this.options.layoutMode,
                
"rowHeight" "columnWidth",
                
"height" "width",
                
"rows" "cols",
                
this.element[d](),
                
hthis.options[b] && this.options[b][c] || this.$filteredAtoms["outer" f(d)](!0) || g;
            
Math.floor(i), Math.max(h1), this[b][e] = hthis[b][c] = i
        
},
        
_checkIfSegmentsChanged: function (a) {
            var 
this.options.layoutMode,
                
"rows" "cols",
                
this[b][c];
            return 
this._getSegments(a), this[b][c] !== d
        
},
        
_masonryReset: function () {
            
this.masonry = {}, this._getSegments();
            var 
this.masonry.cols;
            
this.masonry.colYs = [];
            while (
a--) this.masonry.colYs.push(0)
        },
        
_masonryLayout: function (a) {
            var 
this,
                
c.masonry;
            
a.each(function () {
                var 
b(this),
                    
Math.ceil(a.outerWidth(!0) / d.columnWidth);
                
Math.min(ed.cols);
                if (
=== 1c._masonryPlaceBrick(ad.colYs);
                else {
                    var 
d.cols e,
                        
= [],
                        
hi;
                    for (
0fi++) d.colYs.slice(ie), g[i] = Math.max.apply(Mathh);
                    
c._masonryPlaceBrick(ag)
                }
            })
        },
        
_masonryPlaceBrick: function (ab) {
            var 
Math.min.apply(Mathb),
                
0;
            for (var 
0b.lengthfe++)
                if (
b[e] === c) {
                    
e;
                    break
                }
            var 
this.masonry.columnWidth d,
                
c;
            
this._pushPosition(agh);
            var 
a.outerHeight(!0),
                
this.masonry.cols f;
            for (
0je++) this.masonry.colYs[e] = i
        
},
        
_masonryGetContainerSize: function () {
            var 
Math.max.apply(Maththis.masonry.colYs);
            return {
                
heighta
            
}
        },
        
_masonryResizeChanged: function () {
            return 
this._checkIfSegmentsChanged()
        },
        
_fitRowsReset: function () {
            
this.fitRows = {
                
x0,
                
y0,
                
height0
            
}
        },
        
_fitRowsLayout: function (a) {
            var 
this,
                
this.element.width(),
                
this.fitRows;
            
a.each(function () {
                var 
b(this),
                    
a.outerWidth(!0),
                    
a.outerHeight(!0);
                
e.!== && e.&& (e.0e.e.height), c._pushPosition(ae.xe.y), e.height Math.max(e.ge.height), e.+= f
            
})
        },
        
_fitRowsGetContainerSize: function () {
            return {
                
heightthis.fitRows.height
            
}
        },
        
_fitRowsResizeChanged: function () {
            return !
0
        
},
        
_cellsByRowReset: function () {
            
this.cellsByRow = {
                
index0
            
}, this._getSegments(), this._getSegments(!0)
        },
        
_cellsByRowLayout: function (a) {
            var 
this,
                
this.cellsByRow;
            
a.each(function () {
                var 
b(this),
                    
d.index d.cols,
                    
Math.floor(d.index d.cols),
                    
= (.5) * d.columnWidth a.outerWidth(!0) / 2,
                    
= (.5) * d.rowHeight a.outerHeight(!0) / 2;
                
c._pushPosition(agh), d.index++
            })
        },
        
_cellsByRowGetContainerSize: function () {
            return {
                
heightMath.ceil(this.$filteredAtoms.length this.cellsByRow.cols) * this.cellsByRow.rowHeight this.offset.top
            
}
        },
        
_cellsByRowResizeChanged: function () {
            return 
this._checkIfSegmentsChanged()
        },
        
_straightDownReset: function () {
            
this.straightDown = {
                
y0
            
}
        },
        
_straightDownLayout: function (a) {
            var 
this;
            
a.each(function (a) {
                var 
b(this);
                
c._pushPosition(d0c.straightDown.y), c.straightDown.+= d.outerHeight(!0)
            })
        },
        
_straightDownGetContainerSize: function () {
            return {
                
heightthis.straightDown.y
            
}
        },
        
_straightDownResizeChanged: function () {
            return !
0
        
},
        
_masonryHorizontalReset: function () {
            
this.masonryHorizontal = {}, this._getSegments(!0);
            var 
this.masonryHorizontal.rows;
            
this.masonryHorizontal.rowXs = [];
            while (
a--) this.masonryHorizontal.rowXs.push(0)
        },
        
_masonryHorizontalLayout: function (a) {
            var 
this,
                
c.masonryHorizontal;
            
a.each(function () {
                var 
b(this),
                    
Math.ceil(a.outerHeight(!0) / d.rowHeight);
                
Math.min(ed.rows);
                if (
=== 1c._masonryHorizontalPlaceBrick(ad.rowXs);
                else {
                    var 
d.rows e,
                        
= [],
                        
hi;
                    for (
0fi++) d.rowXs.slice(ie), g[i] = Math.max.apply(Mathh);
                    
c._masonryHorizontalPlaceBrick(ag)
                }
            })
        },
        
_masonryHorizontalPlaceBrick: function (ab) {
            var 
Math.min.apply(Mathb),
                
0;
            for (var 
0b.lengthfe++)
                if (
b[e] === c) {
                    
e;
                    break
                }
            var 
c,
                
this.masonryHorizontal.rowHeight d;
            
this._pushPosition(agh);
            var 
a.outerWidth(!0),
                
this.masonryHorizontal.rows f;
            for (
0je++) this.masonryHorizontal.rowXs[e] = i
        
},
        
_masonryHorizontalGetContainerSize: function () {
            var 
Math.max.apply(Maththis.masonryHorizontal.rowXs);
            return {
                
widtha
            
}
        },
        
_masonryHorizontalResizeChanged: function () {
            return 
this._checkIfSegmentsChanged(!0)
        },
        
_fitColumnsReset: function () {
            
this.fitColumns = {
                
x0,
                
y0,
                
width0
            
}
        },
        
_fitColumnsLayout: function (a) {
            var 
this,
                
this.element.height(),
                
this.fitColumns;
            
a.each(function () {
                var 
b(this),
                    
a.outerWidth(!0),
                    
a.outerHeight(!0);
                
e.!== && e.&& (e.e.widthe.0), c._pushPosition(ae.xe.y), e.width Math.max(e.fe.width), e.+= g
            
})
        },
        
_fitColumnsGetContainerSize: function () {
            return {
                
widththis.fitColumns.width
            
}
        },
        
_fitColumnsResizeChanged: function () {
            return !
0
        
},
        
_cellsByColumnReset: function () {
            
this.cellsByColumn = {
                
index0
            
}, this._getSegments(), this._getSegments(!0)
        },
        
_cellsByColumnLayout: function (a) {
            var 
this,
                
this.cellsByColumn;
            
a.each(function () {
                var 
b(this),
                    
Math.floor(d.index d.rows),
                    
d.index d.rows,
                    
= (.5) * d.columnWidth a.outerWidth(!0) / 2,
                    
= (.5) * d.rowHeight a.outerHeight(!0) / 2;
                
c._pushPosition(agh), d.index++
            })
        },
        
_cellsByColumnGetContainerSize: function () {
            return {
                
widthMath.ceil(this.$filteredAtoms.length this.cellsByColumn.rows) * this.cellsByColumn.columnWidth
            
}
        },
        
_cellsByColumnResizeChanged: function () {
            return 
this._checkIfSegmentsChanged(!0)
        },
        
_straightAcrossReset: function () {
            
this.straightAcross = {
                
x0
            
}
        },
        
_straightAcrossLayout: function (a) {
            var 
this;
            
a.each(function (a) {
                var 
b(this);
                
c._pushPosition(dc.straightAcross.x0), c.straightAcross.+= d.outerWidth(!0)
            })
        },
        
_straightAcrossGetContainerSize: function () {
            return {
                
widththis.straightAcross.x
            
}
        },
        
_straightAcrossResizeChanged: function () {
            return !
0
        
}
    }, 
b.fn.imagesLoaded = function (a) {
        function 
h() {
            
a.call(cd)
        }

        function 
i(a) {
            var 
a.target;
            
c.src !== && b.inArray(cg) === -&& (g.push(c), --<= && (setTimeout(h), d.unbind(".imagesLoaded"i)))
        }
        var 
this,
            
c.find("img").add(c.filter("img")),
            
d.length,
            
"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==",
            
= [];
        return 
|| h(), d.bind("load.imagesLoaded error.imagesLoaded"i).each(function () {
            var 
this.src;
            
this.src fthis.src a
        
}), c
    
};
    var 
= function (b) {
        
a.console && a.console.error(b)
    };
    
b.fn.isotope = function (ac) {
        if (
typeof a == "string") {
            var 
= Array.prototype.slice.call(arguments1);
            
this.each(function () {
                var 
b.data(this"isotope");
                if (!
c) {
                    
w("cannot call methods on isotope prior to initialization; attempted to call method '" "'");
                    return
                }
                if (!
b.isFunction(c[a]) || a.charAt(0) === "_") {
                    
w("no such method '" "' for isotope instance");
                    return
                }
                
c[a].apply(cd)
            })
        } else 
this.each(function () {
            var 
b.data(this"isotope");
            
? (d.option(a), d._init(c)) : b.data(this"isotope", new b.Isotope(athisc))
        });
        return 
this
    
}
})(
windowjQuery);


/*control tabs width from here*/

jQuery(window).load(function () {
    
jQuery(document).ready(function ($) {
        
// cache container
        
var container = $('#portfolio-items-wrap');


        
container.isotope({
            
animationEngine'best-available',
            
animationOptions: {
                
duration200,
                
queuefalse
            
},
            
layoutMode'fitRows'
        
});


        $(
'#filters a').click(function () {
            $(
'#filters a').removeClass('active');
            $(
this).addClass('active');
            var 
selector = $(this).attr('data-filter');
            
container.isotope({
                
filterselector
            
});
            
setProjects();
            return 
false;
        });


        function 
columnsWidth() {
            var 
winWidth = $(window).width(),
                
columns 1;


            if (
winWidth 1200) {
                
columns 4;
            } else if (
winWidth 900) {
                
columns 4;
            } else if (
winWidth 600) {
                
columns 3;
            } else if (
winWidth 300) {
                
columns 1;
            }

            return 
columns;
        }

        function 
setColumns() {
            var 
winWidth = $(window).width(),
                
columns columnsWidth(),
                
postWidth Math.floor(winWidth columns);

            
container.find('.portfolio-item').each(function () {
                $(
this).css({
                    
widthpostWidth 'px'
                
});
            });
        }

        function 
setProjects() {
            
setColumns();
            
container.isotope('reLayout');
        }

        
container.imagesLoaded(function () {
            
setColumns();
        });


        $(
window).bind('resize', function () {
            
setProjects();
        });

    });
});
?>
Онлайн: 3
Реклама