dio-v
8/1/2013 - 8:57 AM

Gestapelde thumbs / fancybox nodig

Gestapelde thumbs / fancybox nodig

        if ($('.thumbs').length) {
        //thumbs
        $('.thumbs').freetile({
            animate: true,
            elementDelay: 30
        });
        $(function ($) {
            var vDelay = 0;
            $('.thumbs a').each(function () {
                var vT = $(this);
                var re = /((http|https|ftp):\/\/[\w?=&.\/-;#~%-]+(?![\w\s?&.\/;#~%"=-]*>))/g;
                vT.attr('title', vT.attr('title').replace(re, '$1 ')).css({'opacity': 0, 'visibility':'visible'});
                setTimeout(function () {
                    vT.animate({'opacity':1});
                },vDelay);
                vDelay = vDelay + 100;
            
                vT.imagesLoaded(function () {
                    var oheight = vT.children(0).height();
                    var owidth = vT.children(0).width();
                    var nheight = (oheight + 12);
                    var nwidth = (owidth + 12);
                    var top = vT.top;
                    var left = vT.left;

                    vT.mouseenter(function () {
                        $(this).css({ 'z-index': '10' }).children(0).css({'max-width': '300px' }).stop().animate({
                            'height': nheight + 'px',
                            'width': nwidth + 'px',
                            'margin-left': '-6px',
                            'margin-top': '-6px'
                            //'transform': 'rotate(' + (Math.floor(Math.random() * 39) - 4) + 'deg)'
                        }, 110);
                    });

                    vT.mouseleave(function () {
                        $(this).children(0).stop().animate({
                            'margin-left': '0px',
                            'margin-top': '0px',
                            'height': oheight + 'px',
                            //'transform': 'rotate(0deg)',
                            'width': owidth + 'px'
                        }, 150, function () {
                            $(this).css('height', oheight + 'px').parent().css('z-index', '1');
                        });
                    });
                });

  	
            }).fancybox({
                'type':'image',
                'width': 'auto',
                'height': 'auto',
                'autoDimensions': true,
                'transitionIn': 'fade',
                'transitionOut': 'fade',
                'speedIn': 500,
                'speedOut': 500,
                'overlayShow': true,
                'hideOnContentClick': false,
                'overlayOpacity': 0.65,
                'cyclic': true,
                'overlayColor': '#000000',
                'showNavArrows': true,
                'titleFromAlt': true,
                'titleShow': true,
                'titlePosition': 'inside'
            });
        });
    }
        
/*!
* Freetile.js v0.3.1
* A dynamic layout plugin for jQuery.
*/
(function (b) { b.fn.freetile = function (c) { if (typeof a[c] === "function") { return a[c].apply(this, Array.prototype.slice.call(arguments, 1)) } else { if (typeof c === "object" || !c) { return a.init.apply(this, arguments) } else { b.error("Method " + c + " does not exist on jQuery.Freetile") } } return this }; var a = { init: function (e) { var d = this, f = a.setupOptions(d, e), g = a.newContent(f.contentToAppend); if (!f.tiled) { a.setupContainerBindings(d, f) } if (f.tiled && g) { d.append(g); g.filter(f.selector || "*").filter(f.loadCheckSelector).imagesLoaded(function () { a.positionAll(d, f) }) } else { d.children(f.loadCheckSelector).imagesLoaded(function () { a.positionAll(d, f) }) } return d }, append: function (e) { var d = this, f = a.setupOptions(d, e), g = a.newContent(f.contentToAppend); if (f.tiled && g) { d.append(g); g.filter(f.loadCheckSelector).imagesLoaded(function () { a.positionAll(d, f) }) } return d }, layout: function (d) { var c = this, e = a.setupOptions(c, d); a.positionAll(c, e); return c }, destroy: function () { var c = this, d = c.data("FreetileData"); a.resetElementsStyle(c, d); b(window).off("resize", this.windowResizeCallback); c.off(d.customEvents, this.customEventsCallback); return true }, setupOptions: function (d, e) { var c = d.data("FreetileData"); var f = b.extend(true, {}, this.defaults, c, this.reset, e); d.data("FreetileData", f); f.tiled = (c !== undefined); f._animate = f.animate && f.tiled && b.isEmptyObject(f.contentToAppend); this.reset.callback = f.persistentCallback && f.callback ? f.callback : function () { }; return f }, windowResizeCallback: function (c, d, e) { clearTimeout(c.data("FreetileTimeout")); c.data("FreetileTimeout", setTimeout(function () { var h = b(window), g = h.width(), f = h.height(); if (g != d || f != e) { d = g, e = f; c.freetile("layout") } }, 400)) }, customEventsCallback: function (c) { clearTimeout(c.data("FreetileTimeout")); c.data("FreetileTimeout", setTimeout(function () { c.freetile("layout") }, 400)) }, setupContainerBindings: function (c, f) { if (f.containerResize) { var e = b(window), d = e.width(), g = e.height(); e.resize(b.proxy(this.windowResizeCallback, c, c, d, g)) } if (f.customEvents) { c.bind(f.customEvents, b.proxy(this.customEventsCallback, c, c)) } return c }, newContent: function (c) { if ((typeof c === "object" && !b.isEmptyObject(c)) || (typeof c === "string" && b(c).length)) { return b(c) } return false }, calculatePositions: function (c, d, e) { d.each(function (o) { var p = b(this), n = 0; e.ElementWidth = p.outerWidth(true); e.ElementHeight = p.outerHeight(true); e.ElementTop = 0; e.ElementIndex = o; e.IndexStart = 0; e.IndexEnd = 0; e.BestScore = 0; e.TestedTop = 0; e.TestedLeft = 0; e.TestedTop = e.currentPos[0].top; for (n = 1; n < e.currentPos.length && e.currentPos[n].left < e.ElementWidth; n++) { e.TestedTop = Math.max(e.TestedTop, e.currentPos[n].top) } e.ElementTop = e.TestedTop; e.IndexEnd = n; e.BestScore = e.scoreFunction(e); for (var o = 1; (o < e.currentPos.length) && (e.currentPos[o].left + e.ElementWidth <= e.containerWidth) ; o++) { e.TestedLeft = e.currentPos[o].left; e.TestedTop = e.currentPos[o].top; for (n = o + 1; (n < e.currentPos.length) && (e.currentPos[n].left - e.currentPos[o].left < e.ElementWidth) ; n++) { e.TestedTop = Math.max(e.TestedTop, e.currentPos[n].top) } var l = e.scoreFunction(e); if (l > e.BestScore) { e.IndexStart = o; e.IndexEnd = n; e.ElementTop = e.TestedTop; e.BestScore = l } } var h = p.position(), q = { left: e.currentPos[e.IndexStart].left + e.xPadding, top: e.ElementTop + e.yPadding }; if (h.top != q.top || h.left != q.left) { var k = { el: p, f: "css", d: 0 }; if (e._animate && !p.hasClass("noanim")) { var f = p.offset(), m = { left: q.left + (f.left - h.left), top: q.top + (f.top - h.top) }; if ((f.top + e.ElementHeight > e.viewportY && f.top < e.viewportYH || m.top + e.ElementHeight > e.viewportY && m.top < e.viewportYH)) { k.f = "animate"; k.d = e.currentDelay; ++(e.iteration); e.currentDelay += e.elementDelay } } k.style = q; e.styleQueue.push(k) } --(e.iteration); var r = e.currentPos[e.IndexEnd - 1].top, s = e.currentPos[e.IndexEnd] ? e.currentPos[e.IndexEnd].left : e.containerWidth, g = e.currentPos[e.IndexStart].left + e.ElementWidth; e.currentPos[e.IndexStart].top = e.ElementTop + e.ElementHeight; if (g < s) { e.currentPos.splice(e.IndexStart + 1, e.IndexEnd - e.IndexStart - 1, { left: g, top: r }) } else { e.currentPos.splice(e.IndexStart + 1, e.IndexEnd - e.IndexStart - 1) } }) }, prepareElements: function (c, d, e) { d.each(function () { var f = b(this); if (f.is(":visible")) { f.css({ display: "block" }) } }).css({ position: "absolute" }) }, applyStyles: function (f) { var e; for (var d = 0, c = f.styleQueue.length; d < c; d++) { e = f.styleQueue[d]; if (e.f == "animate") { e.el.delay(e.d).animate(e.style, b.extend(true, {}, f.animationOptions)) } else { e.el.css(e.style) } } }, positionAll: function (c, g) { if (b.isEmptyObject(g.contentToAppend)) { var j = g.selector ? c.children(g.selector) : c.children() } else { var j = g.selector ? g.contentToAppend.filter(g.selector) : g.contentToAppend } g.ElementsCount = j.length; if (!g.ElementsCount) { c.data("FreetilePos", null); if (typeof (g.callback == "function")) { g.callback(g) } c[g._animate && g.containerAnimate ? "animate" : "css"]({ height: "0px" }); return c } var d = c.css("display") || ""; var f = c.css("visibility") || ""; c.css({ display: "block", width: "", visibility: "hidden" }); g.containerWidth = c.width(); var i = c.data("FreetilePos"); g.currentPos = !b.isEmptyObject(g.contentToAppend) && i ? i : [{ left: 0, top: 0 }]; g.xPadding = parseInt(c.css("padding-left"), 10); g.yPadding = parseInt(c.css("padding-top"), 10); g.viewportY = b(window).scrollTop(); g.viewportYH = g.viewportY + b(window).height(); g.iteration = j.length; g.currentDelay = 0; g.styleQueue = []; g.animationOptions.complete = function () { if (--(g.iteration) <= 0) { g.callback(g) } }; a.prepareElements(c, j, g); a.calculatePositions(c, j, g); a.applyStyles(g); var h = {}; if (d) { h.display = d } if (f) { h.visibility = f } if (c.css("position") == "static") { h.position = "relative" } if (g.forceWidth && g.containerWidthStep > 0) { h.width = g.containerWidthStep * (parseInt(c.width() / g.containerWidthStep, 10)) } c.css(h); var e = b.map(g.currentPos, function (l, k) { return l.top }); h = { height: Math.max.apply(Math, e) }; if (g._animate && g.containerAnimate) { c.stop().animate(h, b.extend(true, {}, g.animationOptions)) } else { c.css(h) } if (g.iteration <= 0) { g.callback(g) } c.data("FreetilePos", g.currentPos); j.addClass("tiled"); return c }, resetElementsStyle: function (c, d) { var e; if (b.isEmptyObject(d.contentToAppend)) { e = d.selector ? c.children(d.selector) : c.children() } else { e = d.selector ? d.contentToAppend.filter(d.selector) : d.contentToAppend } e.each(function () { b(this).attr("style", "") }) }, defaults: { selector: "*", animate: false, elementDelay: 0, containerResize: true, containerAnimate: false, customEvents: "", persistentCallback: false, forceWidth: false, containerWidthStep: 1, loadCheckSelector: ":not(.ignore-load-check)", scoreFunction: function (c) { return -(c.TestedTop) } }, reset: { animationOptions: { complete: function () { } }, callback: function () { }, contentToAppend: {} } } })(jQuery);
/*!
 * imagesLoaded PACKAGED v3.0.2
 * JavaScript is all like "You images are done yet or what?"
 */
(function (d) { function b() { } function f(h, g) { if (c) { return g.indexOf(h) } for (var i = g.length; i--;) { if (g[i] === h) { return i } } return -1 } var a = b.prototype, c = Array.prototype.indexOf ? !0 : !1; a._getEvents = function () { return this._events || (this._events = {}) }, a.getListeners = function (j) { var h, k, g = this._getEvents(); if ("object" == typeof j) { h = {}; for (k in g) { g.hasOwnProperty(k) && j.test(k) && (h[k] = g[k]) } } else { h = g[j] || (g[j] = []) } return h }, a.getListenersAsObject = function (h) { var g, i = this.getListeners(h); return i instanceof Array && (g = {}, g[h] = i), g || i }, a.addListener = function (k, h) { var g, j = this.getListenersAsObject(k); for (g in j) { j.hasOwnProperty(g) && -1 === f(h, j[g]) && j[g].push(h) } return this }, a.on = a.addListener, a.defineEvent = function (g) { return this.getListeners(g), this }, a.defineEvents = function (h) { for (var g = 0; h.length > g; g += 1) { this.defineEvent(h[g]) } return this }, a.removeListener = function (l, h) { var g, k, j = this.getListenersAsObject(l); for (k in j) { j.hasOwnProperty(k) && (g = f(h, j[k]), -1 !== g && j[k].splice(g, 1)) } return this }, a.off = a.removeListener, a.addListeners = function (h, g) { return this.manipulateListeners(!1, h, g) }, a.removeListeners = function (h, g) { return this.manipulateListeners(!0, h, g) }, a.manipulateListeners = function (l, h, p) { var g, k, j = l ? this.removeListener : this.addListener, m = l ? this.removeListeners : this.addListeners; if ("object" != typeof h || h instanceof RegExp) { for (g = p.length; g--;) { j.call(this, h, p[g]) } } else { for (g in h) { h.hasOwnProperty(g) && (k = h[g]) && ("function" == typeof k ? j.call(this, g, k) : m.call(this, g, k)) } } return this }, a.removeEvent = function (j) { var h, k = typeof j, g = this._getEvents(); if ("string" === k) { delete g[j] } else { if ("object" === k) { for (h in g) { g.hasOwnProperty(h) && j.test(h) && delete g[h] } } else { delete this._events } } return this }, a.emitEvent = function (l, h) { var m, g, k, j = this.getListenersAsObject(l); for (g in j) { if (j.hasOwnProperty(g)) { for (m = j[g].length; m--;) { k = h ? j[g][m].apply(null, h) : j[g][m](), k === !0 && this.removeListener(l, j[g][m]) } } } return this }, a.trigger = a.emitEvent, a.emit = function (h) { var g = Array.prototype.slice.call(arguments, 1); return this.emitEvent(h, g) }, "function" == typeof define && define.amd ? define(function () { return b }) : d.EventEmitter = b })(this), function (d) { var b = document.documentElement, f = function () { }; b.addEventListener ? f = function (h, g, i) { h.addEventListener(g, i, !1) } : b.attachEvent && (f = function (g, h, e) { g[h + e] = e.handleEvent ? function () { var i = d.event; i.target = i.target || i.srcElement, e.handleEvent.call(e, i) } : function () { var i = d.event; i.target = i.target || i.srcElement, e.call(g, i) }, g.attachEvent("on" + h, g[h + e]) }); var a = function () { }; b.removeEventListener ? a = function (h, g, i) { h.removeEventListener(g, i, !1) } : b.detachEvent && (a = function (j, h, k) { j.detachEvent("on" + h, j[h + k]); try { delete j[h + k] } catch (g) { j[h + k] = void 0 } }); var c = { bind: f, unbind: a }; "function" == typeof define && define.amd ? define(c) : d.eventie = c }(this), function (j) { function l(h, a) { for (var i in a) { h[i] = a[i] } return h } function d(a) { return "[object Array]" === k.call(a) } function f(o) { var h = []; if (d(o)) { h = o } else { if ("number" == typeof o.length) { for (var a = 0, n = o.length; n > a; a++) { h.push(o[a]) } } else { h.push(o) } } return h } function b(p, q) { function i(r, t, s) { if (!(this instanceof i)) { return new i(r, t) } "string" == typeof r && (r = document.querySelectorAll(r)), this.elements = f(r), this.options = l({}, this.options), "function" == typeof t ? s = t : l(this.options, t), s && this.on("always", s), this.getImages(), m && (this.jqDeferred = new m.Deferred); var a = this; setTimeout(function () { a.check() }) } function h(a) { this.img = a } i.prototype = new p, i.prototype.options = {}, i.prototype.getImages = function () { this.images = []; for (var x = 0, u = this.elements.length; u > x; x++) { var z = this.elements[x]; "IMG" === z.nodeName && this.addImage(z); for (var a = z.querySelectorAll("img"), w = 0, v = a.length; v > w; w++) { var y = a[w]; this.addImage(y) } } }, i.prototype.addImage = function (n) { var a = new h(n); this.images.push(a) }, i.prototype.check = function () { function x(s, n) { return u.options.debug && g && c.log("confirm", s, n), u.progress(s), y++, y === a && u.complete(), !0 } var u = this, y = 0, a = this.images.length; if (this.hasAnyBroken = !1, !a) { return this.complete(), void 0 } for (var w = 0; a > w; w++) { var v = this.images[w]; v.on("confirm", x), v.check() } }, i.prototype.progress = function (a) { this.hasAnyBroken = this.hasAnyBroken || !a.isLoaded, this.emit("progress", this, a), this.jqDeferred && this.jqDeferred.notify(this, a) }, i.prototype.complete = function () { var n = this.hasAnyBroken ? "fail" : "done"; if (this.isComplete = !0, this.emit(n, this), this.emit("always", this), this.jqDeferred) { var a = this.hasAnyBroken ? "reject" : "resolve"; this.jqDeferred[a](this) } }, m && (m.fn.imagesLoaded = function (r, a) { var s = new i(this, r, a); return s.jqDeferred.promise(m(this)) }); var o = {}; return h.prototype = new p, h.prototype.check = function () { var n = o[this.img.src]; if (n) { return this.useCached(n), void 0 } if (o[this.img.src] = this, this.img.complete && void 0 !== this.img.naturalWidth) { return this.confirm(0 !== this.img.naturalWidth, "naturalWidth"), void 0 } var a = this.proxyImage = new Image; q.bind(a, "load", this), q.bind(a, "error", this), a.src = this.img.src }, h.prototype.useCached = function (n) { if (n.isConfirmed) { this.confirm(n.isLoaded, "cached was confirmed") } else { var a = this; n.on("confirm", function (r) { return a.confirm(r.isLoaded, "cache emitted confirmed"), !0 }) } }, h.prototype.confirm = function (n, a) { this.isConfirmed = !0, this.isLoaded = n, this.emit("confirm", this, a) }, h.prototype.handleEvent = function (n) { var a = "on" + n.type; this[a] && this[a](n) }, h.prototype.onload = function () { this.confirm(!0, "onload"), this.unbindProxyEvents() }, h.prototype.onerror = function () { this.confirm(!1, "onerror"), this.unbindProxyEvents() }, h.prototype.unbindProxyEvents = function () { q.unbind(this.proxyImage, "load", this), q.unbind(this.proxyImage, "error", this) }, i } var m = j.jQuery, c = j.console, g = c !== void 0, k = Object.prototype.toString; "function" == typeof define && define.amd ? define(["eventEmitter", "eventie"], b) : j.imagesLoaded = b(j.EventEmitter, j.eventie) }(window);
        
      

/*fotoboek*/
.thumbs{ display: block!important;}
.thumbs a {
    margin: 0 7px 7px 0;
    position: relative;
    visibility: hidden;
    -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
    -moz-box-sizing: border-box;    /* Firefox, other Gecko */
    box-sizing: border-box;         /* Opera/IE 8+ */
}
    .thumbs a:hover {
    }
.thumbs a img {
    width: 145px;
    -moz-border-radius: 5px;
    -webkit-border-radius: 5px;
    border-radius: 5px;
    -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
    -moz-box-sizing: border-box;    /* Firefox, other Gecko */
    box-sizing: border-box;         /* Opera/IE 8+ */
}

/*EINDE fotoboek*/