/* Minification failed. Returning unminified contents.
(1,1): run-time error CSS1019: Unexpected token, found '$'
(1,2): run-time error CSS1019: Unexpected token, found '('
(1,11): run-time error CSS1031: Expected selector, found ')'
(1,11): run-time error CSS1025: Expected comma or open brace, found ')'
(38,2): run-time error CSS1019: Unexpected token, found ')'
(40,10): run-time error CSS1031: Expected selector, found 'iFacRglCallback('
(40,10): run-time error CSS1025: Expected comma or open brace, found 'iFacRglCallback('
(54,10): run-time error CSS1031: Expected selector, found 'sShoppingBagCallback('
(54,10): run-time error CSS1025: Expected comma or open brace, found 'sShoppingBagCallback('
(71,1): run-time error CSS1019: Unexpected token, found '!'
(71,2): run-time error CSS1019: Unexpected token, found 'function('
(71,14): run-time error CSS1031: Expected selector, found ')'
(71,14): run-time error CSS1025: Expected comma or open brace, found ')'
(71,159): run-time error CSS1019: Unexpected token, found '('
(71,165): run-time error CSS1031: Expected selector, found 'function('
(71,8204): run-time error CSS1019: Unexpected token, found ')'
(74,1): run-time error CSS1019: Unexpected token, found '('
(74,11): run-time error CSS1031: Expected selector, found '('
(74,11): run-time error CSS1025: Expected comma or open brace, found '('
(74,7742): run-time error CSS1019: Unexpected token, found ')'
(74,7744): run-time error CSS1030: Expected identifier, found 'call('
(74,7744): run-time error CSS1019: Unexpected token, found 'call('
(74,7753): run-time error CSS1031: Expected selector, found ')'
(74,7753): run-time error CSS1025: Expected comma or open brace, found ')'
(75,1): run-time error CSS1019: Unexpected token, found '$'
(75,2): run-time error CSS1019: Unexpected token, found '('
(75,11): run-time error CSS1031: Expected selector, found ')'
(75,11): run-time error CSS1025: Expected comma or open brace, found ')'
(81,2): run-time error CSS1019: Unexpected token, found ')'
 */
$(document).ready(function () {
    $('.aProductLink').click(function () {
        var odata = {
            iArtikelID: $(this).parent(".divItem").data("artikel-id"),
            iArtikelVariantID: $(this).parent(".divItem").data("variant-id"),
            iAantal: 1
        }
        AjaxRequest("POST", "/Data/shopping-cart.aspx/iFacRgl", odata, "", "json", "iFacRglCallback");
    });
    //if ($(window).width() > 1024) {
    //    function resizeCols() {
    //        var autoheightParentSel = '.autoHeightContainer';
    //        var autoHeightChildSel = '.autoHeightChild';

    //        $(autoheightParentSel).each(function (i, item) {
    //            // remove old class
    //            $(item).find(autoHeightChildSel).css('height', '');
    //            var maxHeight = 0;
    //            $(item).find(autoHeightChildSel).each(function (ii, child) {
    //                maxHeight = Math.max(maxHeight, $(child).outerHeight(true))
    //            });
    //            $(item).find(autoHeightChildSel).css('height', maxHeight + 'px');
    //        });
    //    }

    //    if ($('.autoHeightContainer').length > 0 && $('.autoHeightChild').length > 0) {
    //        // different refereshing techniques
    //        resizeCols();
    //        setTimeout(resizeCols, 0);
    //        setTimeout(resizeCols, 100);
    //        $(window).on('resize', resizeCols);
    //        $(window).on('load', resizeCols);
    //        // again after optional animations
    //        $(window).on('resize', function () { setTimeout(resizeCols, 150); setTimeout(resizeCols, 500) });
    //        $(window).on('load', function () { setTimeout(resizeCols, 150); setTimeout(resizeCols, 500) });
    //    }
    //}
});

function iFacRglCallback() {
    console.log(sMsg);
    if (sMsg.d.code === 1) {
        $('.spanCountProducts').html(sMsg.d.aantal);

        AjaxRequest("POST", "/Data/shopping-cart.aspx", "", "", "html", "sShoppingBagCallback");
       
        return true;
    } else {
        return false;
    }
}


function sShoppingBagCallback() {
    $('.divCartHolder').html($('.selector', $(sMsg)));
    $('#divWinkelmandTotal').html($('.selector-price', $(sMsg)).text());
    $('.liCart').addClass('show');
}

/*!
 * Lightbox v2.8.2
 * by Lokesh Dhakar
 *
 * More info:
 * http://lokeshdhakar.com/projects/lightbox2/
 *
 * Copyright 2007, 2015 Lokesh Dhakar
 * Released under the MIT license
 * https://github.com/lokesh/lightbox2/blob/master/LICENSE
 */
!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],b):"object"==typeof exports?module.exports=b(require("jquery")):a.lightbox=b(a.jQuery)}(this,function(a){function b(b){this.album=[],this.currentImageIndex=void 0,this.init(),this.options=a.extend({},this.constructor.defaults),this.option(b)}return b.defaults={albumLabel:"Image %1 of %2",alwaysShowNavOnTouchDevices:!1,fadeDuration:500,fitImagesInViewport:!0,positionFromTop:50,resizeDuration:700,showImageNumberLabel:!0,wrapAround:!1,disableScrolling:!1},b.prototype.option=function(b){a.extend(this.options,b)},b.prototype.imageCountLabel=function(a,b){return this.options.albumLabel.replace(/%1/g,a).replace(/%2/g,b)},b.prototype.init=function(){this.enable(),this.build()},b.prototype.enable=function(){var b=this;a("body").on("click","a[rel^=lightbox], area[rel^=lightbox], a[data-lightbox], area[data-lightbox]",function(c){return b.start(a(c.currentTarget)),!1})},b.prototype.build=function(){var b=this;a('<div id="lightboxOverlay" class="lightboxOverlay"></div><div id="lightbox" class="lightbox"><div class="lb-outerContainer"><div class="lb-container"><img class="lb-image" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" /><div class="lb-nav"><a class="lb-prev" href="" ></a><a class="lb-next" href="" ></a></div><div class="lb-loader"><a class="lb-cancel"></a></div></div></div><div class="lb-dataContainer"><div class="lb-data"><div class="lb-details"><span class="lb-caption"></span><span class="lb-number"></span></div><div class="lb-closeContainer"><a class="lb-close"></a></div></div></div></div>').appendTo(a("body")),this.$lightbox=a("#lightbox"),this.$overlay=a("#lightboxOverlay"),this.$outerContainer=this.$lightbox.find(".lb-outerContainer"),this.$container=this.$lightbox.find(".lb-container"),this.containerTopPadding=parseInt(this.$container.css("padding-top"),10),this.containerRightPadding=parseInt(this.$container.css("padding-right"),10),this.containerBottomPadding=parseInt(this.$container.css("padding-bottom"),10),this.containerLeftPadding=parseInt(this.$container.css("padding-left"),10),this.$overlay.hide().on("click",function(){return b.end(),!1}),this.$lightbox.hide().on("click",function(c){return"lightbox"===a(c.target).attr("id")&&b.end(),!1}),this.$outerContainer.on("click",function(c){return"lightbox"===a(c.target).attr("id")&&b.end(),!1}),this.$lightbox.find(".lb-prev").on("click",function(){return 0===b.currentImageIndex?b.changeImage(b.album.length-1):b.changeImage(b.currentImageIndex-1),!1}),this.$lightbox.find(".lb-next").on("click",function(){return b.currentImageIndex===b.album.length-1?b.changeImage(0):b.changeImage(b.currentImageIndex+1),!1}),this.$lightbox.find(".lb-loader, .lb-close").on("click",function(){return b.end(),!1})},b.prototype.start=function(b){function c(a){d.album.push({link:a.attr("href"),title:a.attr("data-title")||a.attr("title")})}var d=this,e=a(window);e.on("resize",a.proxy(this.sizeOverlay,this)),a("select, object, embed").css({visibility:"hidden"}),this.sizeOverlay(),this.album=[];var f,g=0,h=b.attr("data-lightbox");if(h){f=a(b.prop("tagName")+'[data-lightbox="'+h+'"]');for(var i=0;i<f.length;i=++i)c(a(f[i])),f[i]===b[0]&&(g=i)}else if("lightbox"===b.attr("rel"))c(b);else{f=a(b.prop("tagName")+'[rel="'+b.attr("rel")+'"]');for(var j=0;j<f.length;j=++j)c(a(f[j])),f[j]===b[0]&&(g=j)}var k=e.scrollTop()+this.options.positionFromTop,l=e.scrollLeft();this.$lightbox.css({top:k+"px",left:l+"px"}).fadeIn(this.options.fadeDuration),this.options.disableScrolling&&a("body").addClass("lb-disable-scrolling"),this.changeImage(g)},b.prototype.changeImage=function(b){var c=this;this.disableKeyboardNav();var d=this.$lightbox.find(".lb-image");this.$overlay.fadeIn(this.options.fadeDuration),a(".lb-loader").fadeIn("slow"),this.$lightbox.find(".lb-image, .lb-nav, .lb-prev, .lb-next, .lb-dataContainer, .lb-numbers, .lb-caption").hide(),this.$outerContainer.addClass("animating");var e=new Image;e.onload=function(){var f,g,h,i,j,k,l;d.attr("src",c.album[b].link),f=a(e),d.width(e.width),d.height(e.height),c.options.fitImagesInViewport&&(l=a(window).width(),k=a(window).height(),j=l-c.containerLeftPadding-c.containerRightPadding-20,i=k-c.containerTopPadding-c.containerBottomPadding-120,c.options.maxWidth&&c.options.maxWidth<j&&(j=c.options.maxWidth),c.options.maxHeight&&c.options.maxHeight<j&&(i=c.options.maxHeight),(e.width>j||e.height>i)&&(e.width/j>e.height/i?(h=j,g=parseInt(e.height/(e.width/h),10),d.width(h),d.height(g)):(g=i,h=parseInt(e.width/(e.height/g),10),d.width(h),d.height(g)))),c.sizeContainer(d.width(),d.height())},e.src=this.album[b].link,this.currentImageIndex=b},b.prototype.sizeOverlay=function(){this.$overlay.width(a(document).width()).height(a(document).height())},b.prototype.sizeContainer=function(a,b){function c(){d.$lightbox.find(".lb-dataContainer").width(g),d.$lightbox.find(".lb-prevLink").height(h),d.$lightbox.find(".lb-nextLink").height(h),d.showImage()}var d=this,e=this.$outerContainer.outerWidth(),f=this.$outerContainer.outerHeight(),g=a+this.containerLeftPadding+this.containerRightPadding,h=b+this.containerTopPadding+this.containerBottomPadding;e!==g||f!==h?this.$outerContainer.animate({width:g,height:h},this.options.resizeDuration,"swing",function(){c()}):c()},b.prototype.showImage=function(){this.$lightbox.find(".lb-loader").stop(!0).hide(),this.$lightbox.find(".lb-image").fadeIn("slow"),this.updateNav(),this.updateDetails(),this.preloadNeighboringImages(),this.enableKeyboardNav()},b.prototype.updateNav=function(){var a=!1;try{document.createEvent("TouchEvent"),a=this.options.alwaysShowNavOnTouchDevices?!0:!1}catch(b){}this.$lightbox.find(".lb-nav").show(),this.album.length>1&&(this.options.wrapAround?(a&&this.$lightbox.find(".lb-prev, .lb-next").css("opacity","1"),this.$lightbox.find(".lb-prev, .lb-next").show()):(this.currentImageIndex>0&&(this.$lightbox.find(".lb-prev").show(),a&&this.$lightbox.find(".lb-prev").css("opacity","1")),this.currentImageIndex<this.album.length-1&&(this.$lightbox.find(".lb-next").show(),a&&this.$lightbox.find(".lb-next").css("opacity","1"))))},b.prototype.updateDetails=function(){var b=this;if("undefined"!=typeof this.album[this.currentImageIndex].title&&""!==this.album[this.currentImageIndex].title&&this.$lightbox.find(".lb-caption").html(this.album[this.currentImageIndex].title).fadeIn("fast").find("a").on("click",function(b){void 0!==a(this).attr("target")?window.open(a(this).attr("href"),a(this).attr("target")):location.href=a(this).attr("href")}),this.album.length>1&&this.options.showImageNumberLabel){var c=this.imageCountLabel(this.currentImageIndex+1,this.album.length);this.$lightbox.find(".lb-number").text(c).fadeIn("fast")}else this.$lightbox.find(".lb-number").hide();this.$outerContainer.removeClass("animating"),this.$lightbox.find(".lb-dataContainer").fadeIn(this.options.resizeDuration,function(){return b.sizeOverlay()})},b.prototype.preloadNeighboringImages=function(){if(this.album.length>this.currentImageIndex+1){var a=new Image;a.src=this.album[this.currentImageIndex+1].link}if(this.currentImageIndex>0){var b=new Image;b.src=this.album[this.currentImageIndex-1].link}},b.prototype.enableKeyboardNav=function(){a(document).on("keyup.keyboard",a.proxy(this.keyboardAction,this))},b.prototype.disableKeyboardNav=function(){a(document).off(".keyboard")},b.prototype.keyboardAction=function(a){var b=27,c=37,d=39,e=a.keyCode,f=String.fromCharCode(e).toLowerCase();e===b||f.match(/x|o|c/)?this.end():"p"===f||e===c?0!==this.currentImageIndex?this.changeImage(this.currentImageIndex-1):this.options.wrapAround&&this.album.length>1&&this.changeImage(this.album.length-1):("n"===f||e===d)&&(this.currentImageIndex!==this.album.length-1?this.changeImage(this.currentImageIndex+1):this.options.wrapAround&&this.album.length>1&&this.changeImage(0))},b.prototype.end=function(){this.disableKeyboardNav(),a(window).off("resize",this.sizeOverlay),this.$lightbox.fadeOut(this.options.fadeDuration),this.$overlay.fadeOut(this.options.fadeDuration),a("select, object, embed").css({visibility:"visible"}),this.options.disableScrolling&&a("body").removeClass("lb-disable-scrolling")},new b});
//# sourceMappingURL=lightbox.min.map
// Generated by CoffeeScript 1.9.3
(function () { var e; e = function () { function e(e, t) { var n, r; this.options = { target: "instafeed", get: "popular", resolution: "thumbnail", sortBy: "none", links: !0, mock: !1, useHttp: !1 }; if (typeof e == "object") for (n in e) r = e[n], this.options[n] = r; this.context = t != null ? t : this, this.unique = this._genKey() } return e.prototype.hasNext = function () { return typeof this.context.nextUrl == "string" && this.context.nextUrl.length > 0 }, e.prototype.next = function () { return this.hasNext() ? this.run(this.context.nextUrl) : !1 }, e.prototype.run = function (t) { var n, r, i; if (typeof this.options.clientId != "string" && typeof this.options.accessToken != "string") throw new Error("Missing clientId or accessToken."); if (typeof this.options.accessToken != "string" && typeof this.options.clientId != "string") throw new Error("Missing clientId or accessToken."); return this.options.before != null && typeof this.options.before == "function" && this.options.before.call(this), typeof document != "undefined" && document !== null && (i = document.createElement("script"), i.id = "instafeed-fetcher", i.src = t || this._buildUrl(), n = document.getElementsByTagName("head"), n[0].appendChild(i), r = "instafeedCache" + this.unique, window[r] = new e(this.options, this), window[r].unique = this.unique), !0 }, e.prototype.parse = function (e) { var t, n, r, i, s, o, u, a, f, l, c, h, p, d, v, m, g, y, b, w, E, S, x, T, N, C, k, L, A, O, M, _, D; if (typeof e != "object") { if (this.options.error != null && typeof this.options.error == "function") return this.options.error.call(this, "Invalid JSON data"), !1; throw new Error("Invalid JSON response") } if (e.meta.code !== 200) { if (this.options.error != null && typeof this.options.error == "function") return this.options.error.call(this, e.meta.error_message), !1; throw new Error("Error from Instagram: " + e.meta.error_message) } if (e.data.length === 0) { if (this.options.error != null && typeof this.options.error == "function") return this.options.error.call(this, "No images were returned from Instagram"), !1; throw new Error("No images were returned from Instagram") } this.options.success != null && typeof this.options.success == "function" && this.options.success.call(this, e), this.context.nextUrl = "", e.pagination != null && (this.context.nextUrl = e.pagination.next_url); if (this.options.sortBy !== "none") { this.options.sortBy === "random" ? M = ["", "random"] : M = this.options.sortBy.split("-"), O = M[0] === "least" ? !0 : !1; switch (M[1]) { case "random": e.data.sort(function () { return .5 - Math.random() }); break; case "recent": e.data = this._sortBy(e.data, "created_time", O); break; case "liked": e.data = this._sortBy(e.data, "likes.count", O); break; case "commented": e.data = this._sortBy(e.data, "comments.count", O); break; default: throw new Error("Invalid option for sortBy: '" + this.options.sortBy + "'.") } } if (typeof document != "undefined" && document !== null && this.options.mock === !1) { m = e.data, A = parseInt(this.options.limit, 10), this.options.limit != null && m.length > A && (m = m.slice(0, A)), u = document.createDocumentFragment(), this.options.filter != null && typeof this.options.filter == "function" && (m = this._filter(m, this.options.filter)); if (this.options.template != null && typeof this.options.template == "string") { f = "", d = "", w = "", D = document.createElement("div"); for (c = 0, N = m.length; c < N; c++) { h = m[c], p = h.images[this.options.resolution]; if (typeof p != "object") throw o = "No image found for resolution: " + this.options.resolution + ".", new Error(o); E = p.width, y = p.height, b = "square", E > y && (b = "landscape"), E < y && (b = "portrait"), v = p.url, l = window.location.protocol.indexOf("http") >= 0, l && !this.options.useHttp && (v = v.replace(/https?:\/\//, "//")), d = this._makeTemplate(this.options.template, { model: h, id: h.id, link: h.link, type: h.type, image: v, width: E, height: y, orientation: b, caption: this._getObjectProperty(h, "caption.text"), likes: h.likes.count, comments: h.comments.count, location: this._getObjectProperty(h, "location.name") }), f += d } D.innerHTML = f, i = [], r = 0, n = D.childNodes.length; while (r < n) i.push(D.childNodes[r]), r += 1; for (x = 0, C = i.length; x < C; x++)L = i[x], u.appendChild(L) } else for (T = 0, k = m.length; T < k; T++) { h = m[T], g = document.createElement("img"), p = h.images[this.options.resolution]; if (typeof p != "object") throw o = "No image found for resolution: " + this.options.resolution + ".", new Error(o); v = p.url, l = window.location.protocol.indexOf("http") >= 0, l && !this.options.useHttp && (v = v.replace(/https?:\/\//, "//")), g.src = v, this.options.links === !0 ? (t = document.createElement("a"), t.href = h.link, t.appendChild(g), u.appendChild(t)) : u.appendChild(g) } _ = this.options.target, typeof _ == "string" && (_ = document.getElementById(_)); if (_ == null) throw o = 'No element with id="' + this.options.target + '" on page.', new Error(o); _.appendChild(u), a = document.getElementsByTagName("head")[0], a.removeChild(document.getElementById("instafeed-fetcher")), S = "instafeedCache" + this.unique, window[S] = void 0; try { delete window[S] } catch (P) { s = P } } return this.options.after != null && typeof this.options.after == "function" && this.options.after.call(this), !0 }, e.prototype._buildUrl = function () { var e, t, n; e = "https://api.instagram.com/v1"; switch (this.options.get) { case "popular": t = "media/popular"; break; case "tagged": if (!this.options.tagName) throw new Error("No tag name specified. Use the 'tagName' option."); t = "tags/" + this.options.tagName + "/media/recent"; break; case "location": if (!this.options.locationId) throw new Error("No location specified. Use the 'locationId' option."); t = "locations/" + this.options.locationId + "/media/recent"; break; case "user": if (!this.options.userId) throw new Error("No user specified. Use the 'userId' option."); t = "users/" + this.options.userId + "/media/recent"; break; default: throw new Error("Invalid option for get: '" + this.options.get + "'.") }return n = e + "/" + t, this.options.accessToken != null ? n += "?access_token=" + this.options.accessToken : n += "?client_id=" + this.options.clientId, this.options.limit != null && (n += "&count=" + this.options.limit), n += "&callback=instafeedCache" + this.unique + ".parse", n }, e.prototype._genKey = function () { var e; return e = function () { return ((1 + Math.random()) * 65536 | 0).toString(16).substring(1) }, "" + e() + e() + e() + e() }, e.prototype._makeTemplate = function (e, t) { var n, r, i, s, o; r = /(?:\{{2})([\w\[\]\.]+)(?:\}{2})/, n = e; while (r.test(n)) s = n.match(r)[1], o = (i = this._getObjectProperty(t, s)) != null ? i : "", n = n.replace(r, function () { return "" + o }); return n }, e.prototype._getObjectProperty = function (e, t) { var n, r; t = t.replace(/\[(\w+)\]/g, ".$1"), r = t.split("."); while (r.length) { n = r.shift(); if (!(e != null && n in e)) return null; e = e[n] } return e }, e.prototype._sortBy = function (e, t, n) { var r; return r = function (e, r) { var i, s; return i = this._getObjectProperty(e, t), s = this._getObjectProperty(r, t), n ? i > s ? 1 : -1 : i < s ? 1 : -1 }, e.sort(r.bind(this)), e }, e.prototype._filter = function (e, t) { var n, r, i, s, o; n = [], r = function (e) { if (t(e)) return n.push(e) }; for (i = 0, o = e.length; i < o; i++)s = e[i], r(s); return n }, e }(), function (e, t) { return typeof define == "function" && define.amd ? define([], t) : typeof module == "object" && module.exports ? module.exports = t() : e.Instafeed = t() }(this, function () { return e }) }).call(this);
$(document).ready(function () {

    lightbox.option({
        'resizeDuration': 200,
        'wrapAround': true
    })
});


