/* Minification failed. Returning unminified contents.
(11,3): run-time error CSS1019: Unexpected token, found '('
(11,13): run-time error CSS1031: Expected selector, found '('
(11,13): run-time error CSS1025: Expected comma or open brace, found '('
(86,2): run-time error CSS1019: Unexpected token, found ')'
(86,3): run-time error CSS1019: Unexpected token, found '('
(86,19): run-time error CSS1030: Expected identifier, found '|'
(86,19): run-time error CSS1031: Expected selector, found '|'
(86,19): run-time error CSS1025: Expected comma or open brace, found '|'
(87,1): run-time error CSS1019: Unexpected token, found '('
(87,2): run-time error CSS1019: Unexpected token, found 'function('
(87,11): run-time error CSS1019: Unexpected token, found ')'
(87,12): run-time error CSS1019: Unexpected token, found '{'
(87,13): run-time error CSS1019: Unexpected token, found '"use strict"'
(87,35): run-time error CSS1031: Expected selector, found 'n('
(87,35): run-time error CSS1025: Expected comma or open brace, found 'n('
(87,9115): run-time error CSS1031: Expected selector, found '='
(87,9115): run-time error CSS1025: Expected comma or open brace, found '='
(88,10): run-time error CSS1031: Expected selector, found 'initComparisons('
(88,10): run-time error CSS1025: Expected comma or open brace, found 'initComparisons('
(165,1): run-time error CSS1019: Unexpected token, found '$'
(165,2): run-time error CSS1019: Unexpected token, found '('
(165,11): run-time error CSS1031: Expected selector, found ')'
(165,11): run-time error CSS1025: Expected comma or open brace, found ')'
(166,1): run-time error CSS1019: Unexpected token, found '('
(166,2): run-time error CSS1019: Unexpected token, found 'function('
(166,11): run-time error CSS1019: Unexpected token, found ')'
(166,12): run-time error CSS1019: Unexpected token, found '{'
(166,22): run-time error CSS1031: Expected selector, found ';'
(166,22): run-time error CSS1025: Expected comma or open brace, found ';'
(166,24): run-time error CSS1031: Expected selector, found '='
(166,24): run-time error CSS1025: Expected comma or open brace, found '='
(166,33): run-time error CSS1031: Expected selector, found '='
(166,33): run-time error CSS1025: Expected comma or open brace, found '='
(166,261): run-time error CSS1019: Unexpected token, found ')'
(166,262): run-time error CSS1019: Unexpected token, found '('
(166,263): run-time error CSS1019: Unexpected token, found ')'
(166,266): run-time error CSS1031: Expected selector, found '='
(166,266): run-time error CSS1025: Expected comma or open brace, found '='
(166,7322): run-time error CSS1019: Unexpected token, found ')'
(166,7323): run-time error CSS1019: Unexpected token, found '('
(166,7324): run-time error CSS1019: Unexpected token, found ')'
(166,7326): run-time error CSS1019: Unexpected token, found 'b('
(166,7328): run-time error CSS1019: Unexpected token, found 'function('
(166,7337): run-time error CSS1019: Unexpected token, found ')'
(166,7338): run-time error CSS1019: Unexpected token, found '{'
(166,7346): run-time error CSS1031: Expected selector, found ';'
(166,7346): run-time error CSS1025: Expected comma or open brace, found ';'
(166,7348): run-time error CSS1031: Expected selector, found '='
(166,7348): run-time error CSS1025: Expected comma or open brace, found '='
(166,7365): run-time error CSS1031: Expected selector, found '='
(166,7365): run-time error CSS1025: Expected comma or open brace, found '='
(199,15): run-time error CSS1031: Expected selector, found '='
(199,15): run-time error CSS1025: Expected comma or open brace, found '='
(200,25): run-time error CSS1031: Expected selector, found '='
(200,25): run-time error CSS1025: Expected comma or open brace, found '='
(201,27): run-time error CSS1031: Expected selector, found '='
(201,27): run-time error CSS1025: Expected comma or open brace, found '='
(202,21): run-time error CSS1031: Expected selector, found '='
(202,21): run-time error CSS1025: Expected comma or open brace, found '='
(205,1): run-time error CSS1019: Unexpected token, found '('
(205,11): run-time error CSS1031: Expected selector, found '('
(205,11): run-time error CSS1025: Expected comma or open brace, found '('
(567,2): run-time error CSS1019: Unexpected token, found ')'
(567,3): run-time error CSS1019: Unexpected token, found '('
(567,10): run-time error CSS1031: Expected selector, found ')'
(567,10): run-time error CSS1025: Expected comma or open brace, found ')'
(572,1): run-time error CSS1019: Unexpected token, found '!'
(572,11): run-time error CSS1031: Expected selector, found '('
(572,11): run-time error CSS1025: Expected comma or open brace, found '('
(583,2): run-time error CSS1019: Unexpected token, found '('
(583,3): run-time error CSS1019: Unexpected token, found ')'
 */
/*jshint browser:true */
/*!
* FitVids 1.1
*
* Copyright 2013, Chris Coyier - http://css-tricks.com + Dave Rupert - http://daverupert.com
* Credit to Thierry Koblentz - http://www.alistapart.com/articles/creating-intrinsic-ratios-for-video/
* Released under the WTFPL license - http://sam.zoy.org/wtfpl/
*
*/

; (function ($) {

    'use strict';

    $.fn.fitVids = function (options) {
        var settings = {
            customSelector: null,
            ignore: null
        };

        if (!document.getElementById('fit-vids-style')) {
            // appendStyles: https://github.com/toddmotto/fluidvids/blob/master/dist/fluidvids.js
            var head = document.head || document.getElementsByTagName('head')[0];
            var css = '.fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}';
            var div = document.createElement("div");
            div.innerHTML = '<p>x</p><style id="fit-vids-style">' + css + '</style>';
            head.appendChild(div.childNodes[1]);
        }

        if (options) {
            $.extend(settings, options);
        }

        return this.each(function () {
            var selectors = [
              'iframe[src*="player.vimeo.com"]',
              'iframe[src*="youtube.com"]',
              'iframe[src*="youtube-nocookie.com"]',
              'iframe[src*="kickstarter.com"][src*="video.html"]',
              'object',
              'embed'
            ];

            if (settings.customSelector) {
                selectors.push(settings.customSelector);
            }

            var ignoreList = '.fitvidsignore';

            if (settings.ignore) {
                ignoreList = ignoreList + ', ' + settings.ignore;
            }

            var $allVideos = $(this).find(selectors.join(','));
            $allVideos = $allVideos.not('object object'); // SwfObj conflict patch
            $allVideos = $allVideos.not(ignoreList); // Disable FitVids on this video.

            $allVideos.each(function () {
                var $this = $(this);
                if ($this.parents(ignoreList).length > 0) {
                    return; // Disable FitVids on this video.
                }
                if (this.tagName.toLowerCase() === 'embed' && $this.parent('object').length || $this.parent('.fluid-width-video-wrapper').length) { return; }
                if ((!$this.css('height') && !$this.css('width')) && (isNaN($this.attr('height')) || isNaN($this.attr('width')))) {
                    $this.attr('height', 9);
                    $this.attr('width', 16);
                }
                var height = (this.tagName.toLowerCase() === 'object' || ($this.attr('height') && !isNaN(parseInt($this.attr('height'), 10)))) ? parseInt($this.attr('height'), 10) : $this.height(),
                    width = !isNaN(parseInt($this.attr('width'), 10)) ? parseInt($this.attr('width'), 10) : $this.width(),
                    aspectRatio = height / width;
                if (!$this.attr('name')) {
                    var videoName = 'fitvid' + $.fn.fitVids._count;
                    $this.attr('name', videoName);
                    $.fn.fitVids._count++;
                }
                $this.wrap('<div class="fluid-width-video-wrapper"></div>').parent('.fluid-width-video-wrapper').css('padding-top', (aspectRatio * 100) + '%');
                $this.removeAttr('height').removeAttr('width');
            });
        });
    };

    // Internal counter for unique video names.
    $.fn.fitVids._count = 0;

    // Works with either jQuery or Zepto
})(window.jQuery || window.Zepto);
(function(){"use strict";function n(n){function s(s,h){var rt,ut,p=s==window,l=h&&h.message!==undefined?h.message:undefined,g,k,d,tt,nt,w,b,it,ft,et,at;if(h=n.extend({},n.blockUI.defaults,h||{}),!h.ignoreIfBlocked||!n(s).data("blockUI.isBlocked")){if(h.overlayCSS=n.extend({},n.blockUI.defaults.overlayCSS,h.overlayCSS||{}),rt=n.extend({},n.blockUI.defaults.css,h.css||{}),h.onOverlayClick&&(h.overlayCSS.cursor="pointer"),ut=n.extend({},n.blockUI.defaults.themedCSS,h.themedCSS||{}),l=l===undefined?h.message:l,p&&t&&e(window,{fadeOut:0}),l&&typeof l!="string"&&(l.parentNode||l.jquery)&&(g=l.jquery?l[0]:l,k={},n(s).data("blockUI.history",k),k.el=g,k.parent=g.parentNode,k.display=g.style.display,k.position=g.style.position,k.parent&&k.parent.removeChild(g)),n(s).data("blockUI.onUnblock",h.onUnblock),d=h.baseZ,tt=f||h.forceIframe?n('<iframe class="blockUI" style="z-index:'+d+++';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="'+h.iframeSrc+'"><\/iframe>'):n('<div class="blockUI" style="display:none"><\/div>'),nt=h.theme?n('<div class="blockUI blockOverlay ui-widget-overlay" style="z-index:'+d+++';display:none"><\/div>'):n('<div class="blockUI blockOverlay" style="z-index:'+d+++';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"><\/div>'),h.theme&&p?(b='<div class="blockUI '+h.blockMsgClass+' blockPage ui-dialog ui-widget ui-corner-all" style="z-index:'+(d+10)+';display:none;position:fixed">',h.title&&(b+='<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(h.title||"&nbsp;")+"<\/div>"),b+='<div class="ui-widget-content ui-dialog-content"><\/div>',b+="<\/div>"):h.theme?(b='<div class="blockUI '+h.blockMsgClass+' blockElement ui-dialog ui-widget ui-corner-all" style="z-index:'+(d+10)+';display:none;position:absolute">',h.title&&(b+='<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(h.title||"&nbsp;")+"<\/div>"),b+='<div class="ui-widget-content ui-dialog-content"><\/div>',b+="<\/div>"):b=p?'<div class="blockUI '+h.blockMsgClass+' blockPage" style="z-index:'+(d+10)+';display:none;position:fixed"><\/div>':'<div class="blockUI '+h.blockMsgClass+' blockElement" style="z-index:'+(d+10)+';display:none;position:absolute"><\/div>',w=n(b),l&&(h.theme?(w.css(ut),w.addClass("ui-widget-content")):w.css(rt)),h.theme||nt.css(h.overlayCSS),nt.css("position",p?"fixed":"absolute"),(f||h.forceIframe)&&tt.css("opacity",0),it=[tt,nt,w],ft=p?n("body"):n(s),n.each(it,function(){this.appendTo(ft)}),h.theme&&h.draggable&&n.fn.draggable&&w.draggable({handle:".ui-dialog-titlebar",cancel:"li"}),et=v&&(!n.support.boxModel||n("object,embed",p?null:s).length>0),o||et){if(p&&h.allowBodyStretch&&n.support.boxModel&&n("html,body").css("height","100%"),(o||!n.support.boxModel)&&!p)var ot=r(s,"borderTopWidth"),st=r(s,"borderLeftWidth"),ht=ot?"(0 - "+ot+")":0,ct=st?"(0 - "+st+")":0;n.each(it,function(n,t){var i=t[0].style,r,u;i.position="absolute";n<2?(p?i.setExpression("height","Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.support.boxModel?0:"+h.quirksmodeOffsetHack+') + "px"'):i.setExpression("height",'this.parentNode.offsetHeight + "px"'),p?i.setExpression("width",'jQuery.support.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"'):i.setExpression("width",'this.parentNode.offsetWidth + "px"'),ct&&i.setExpression("left",ct),ht&&i.setExpression("top",ht)):h.centerY?(p&&i.setExpression("top",'(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"'),i.marginTop=0):!h.centerY&&p&&(r=h.css&&h.css.top?parseInt(h.css.top,10):0,u="((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "+r+') + "px"',i.setExpression("top",u))})}if(l&&(h.theme?w.find(".ui-widget-content").append(l):w.append(l),(l.jquery||l.nodeType)&&n(l).show()),(f||h.forceIframe)&&h.showOverlay&&tt.show(),h.fadeIn){var lt=h.onBlock?h.onBlock:u,vt=h.showOverlay&&!l?lt:u,yt=l?lt:u;h.showOverlay&&nt._fadeIn(h.fadeIn,vt);l&&w._fadeIn(h.fadeIn,yt)}else h.showOverlay&&nt.show(),l&&w.show(),h.onBlock&&h.onBlock();c(1,s,h);p?(t=w[0],i=n(h.focusableElements,t),h.focusInput&&setTimeout(a,20)):y(w[0],h.centerX,h.centerY);h.timeout&&(at=setTimeout(function(){p?n.unblockUI(h):n(s).unblock(h)},h.timeout),n(s).data("blockUI.timeout",at))}}function e(r,u){var o,s=r==window,e=n(r),l=e.data("blockUI.history"),a=e.data("blockUI.timeout"),f;a&&(clearTimeout(a),e.removeData("blockUI.timeout"));u=n.extend({},n.blockUI.defaults,u||{});c(0,r,u);u.onUnblock===null&&(u.onUnblock=e.data("blockUI.onUnblock"),e.removeData("blockUI.onUnblock"));f=s?n("body").children().filter(".blockUI").add("body > .blockUI"):e.find(">.blockUI");u.cursorReset&&(f.length>1&&(f[1].style.cursor=u.cursorReset),f.length>2&&(f[2].style.cursor=u.cursorReset));s&&(t=i=null);u.fadeOut?(o=f.length,f.stop().fadeOut(u.fadeOut,function(){--o==0&&h(f,l,u,r)})):h(f,l,u,r)}function h(t,i,r,u){var f=n(u);if(!f.data("blockUI.isBlocked")){if(t.each(function(){this.parentNode&&this.parentNode.removeChild(this)}),i&&i.el&&(i.el.style.display=i.display,i.el.style.position=i.position,i.parent&&i.parent.appendChild(i.el),f.removeData("blockUI.history")),f.data("blockUI.static")&&f.css("position","static"),typeof r.onUnblock=="function")r.onUnblock(u,r);var e=n(document.body),o=e.width(),s=e[0].style.width;e.width(o-1).width(o);e[0].style.width=s}}function c(i,r,u){var f=r==window,o=n(r),e;(i||(!f||t)&&(f||o.data("blockUI.isBlocked")))&&(o.data("blockUI.isBlocked",i),f&&u.bindEvents&&(!i||u.showOverlay))&&(e="mousedown mouseup keydown keypress keyup touchstart touchend touchmove",i?n(document).bind(e,u,l):n(document).unbind(e,l))}function l(r){var u,f;if(r.type==="keydown"&&r.keyCode&&r.keyCode==9&&t&&r.data.constrainTabKey){var e=i,s=!r.shiftKey&&r.target===e[e.length-1],o=r.shiftKey&&r.target===e[0];if(s||o)return setTimeout(function(){a(o)},10),!1}if(u=r.data,f=n(r.target),f.hasClass("blockOverlay")&&u.onOverlayClick)u.onOverlayClick(r);return f.parents("div."+u.blockMsgClass).length>0?!0:f.parents().children().filter("div.blockUI").length===0}function a(n){if(i){var t=i[n===!0?i.length-1:0];t&&t.focus()}}function y(n,t,i){var u=n.parentNode,f=n.style,e=(u.offsetWidth-n.offsetWidth)/2-r(u,"borderLeftWidth"),o=(u.offsetHeight-n.offsetHeight)/2-r(u,"borderTopWidth");t&&(f.left=e>0?e+"px":"0");i&&(f.top=o>0?o+"px":"0")}function r(t,i){return parseInt(n.css(t,i),10)||0}var t,i;n.fn._fadeIn=n.fn.fadeIn;var u=n.noop||function(){},f=/MSIE/.test(navigator.userAgent),o=/MSIE 6.0/.test(navigator.userAgent)&&!/MSIE 8.0/.test(navigator.userAgent),p=document.documentMode||0,v=n.isFunction(document.createElement("div").style.setExpression);n.blockUI=function(n){s(window,n)};n.unblockUI=function(n){e(window,n)};n.growlUI=function(t,i,r,u){var f=n('<div class="growlUI"><\/div>'),e,o;t&&f.append("<h1>"+t+"<\/h1>");i&&f.append("<h2>"+i+"<\/h2>");r===undefined&&(r=3e3);e=function(t){t=t||{};n.blockUI({message:f,fadeIn:typeof t.fadeIn!="undefined"?t.fadeIn:700,fadeOut:typeof t.fadeOut!="undefined"?t.fadeOut:1e3,timeout:typeof t.timeout!="undefined"?t.timeout:r,centerY:!1,showOverlay:!1,onUnblock:u,css:n.blockUI.defaults.growlCSS})};e();o=f.css("opacity");f.mouseover(function(){e({fadeIn:0,timeout:3e4});var t=n(".blockMsg");t.stop();t.fadeTo(300,1)}).mouseout(function(){n(".blockMsg").fadeOut(1e3)})};n.fn.block=function(t){if(this[0]===window)return n.blockUI(t),this;var i=n.extend({},n.blockUI.defaults,t||{});return this.each(function(){var t=n(this);i.ignoreIfBlocked&&t.data("blockUI.isBlocked")||t.unblock({fadeOut:0})}),this.each(function(){n.css(this,"position")=="static"&&(this.style.position="relative",n(this).data("blockUI.static",!0));this.style.zoom=1;s(this,t)})};n.fn.unblock=function(t){return this[0]===window?(n.unblockUI(t),this):this.each(function(){e(this,t)})};n.blockUI.version=2.66;n.blockUI.defaults={message:"<h1>Please wait...<\/h1>",title:null,draggable:!0,theme:!1,css:{padding:0,margin:0,width:"30%",top:"40%",left:"35%",textAlign:"center",color:"#000",border:"3px solid #aaa",backgroundColor:"#fff",cursor:"wait"},themedCSS:{width:"30%",top:"40%",left:"35%"},overlayCSS:{backgroundColor:"#000",opacity:.6,cursor:"wait"},cursorReset:"default",growlCSS:{width:"350px",top:"10px",left:"",right:"10px",border:"none",padding:"5px",opacity:.6,cursor:"default",color:"#fff",backgroundColor:"#000","-webkit-border-radius":"10px","-moz-border-radius":"10px","border-radius":"10px"},iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank",forceIframe:!1,baseZ:1e3,centerX:!0,centerY:!0,allowBodyStretch:!0,bindEvents:!0,constrainTabKey:!0,fadeIn:200,fadeOut:400,timeout:0,showOverlay:!0,focusInput:!0,focusableElements:":input:enabled:visible",onBlock:null,onUnblock:null,onOverlayClick:null,quirksmodeOffsetHack:4,blockMsgClass:"blockMsg",ignoreIfBlocked:!1};t=null;i=[]}typeof define=="function"&&define.amd&&define.amd.jQuery?define(["jquery"],n):n(jQuery)})();
function initComparisons() {
    var x, i;
    /* Find all elements with an "overlay" class: */
    x = document.getElementsByClassName("img-comp-overlay");
    for (i = 0; i < x.length; i++) {
        /* Once for each "overlay" element:
        pass the "overlay" element as a parameter when executing the compareImages function: */
        compareImages(x[i]);
    }
    function compareImages(img) {
        var slider, img, clicked = 0, w, h;
        /* Get the width and height of the img element */
        w = img.offsetWidth;
        h = img.offsetHeight;
        /* Set the width of the img element to 50%: */
        img.style.width = (w / 2) + "px";
        /* Create slider: */
        slider = document.createElement("DIV");
        slider.setAttribute("class", "img-comp-slider");
        /* Insert slider */
        img.parentElement.insertBefore(slider, img);
        /* Position the slider in the middle: */
        slider.style.top = (h / 2) - (slider.offsetHeight / 2) + "px";
        slider.style.left = (w / 2) - (slider.offsetWidth / 2) + "px";
        /* Execute a function when the mouse button is pressed: */
        slider.addEventListener("mousedown", slideReady);
        /* And another function when the mouse button is released: */
        window.addEventListener("mouseup", slideFinish);
        /* Or touched (for touch screens: */
        slider.addEventListener("touchstart", slideReady);
        /* And released (for touch screens: */
        window.addEventListener("touchend", slideFinish);
        function slideReady(e) {
            /* Prevent any other actions that may occur when moving over the image: */
            e.preventDefault();
            /* The slider is now clicked and ready to move: */
            clicked = 1;
            /* Execute a function when the slider is moved: */
            window.addEventListener("mousemove", slideMove);
            window.addEventListener("touchmove", slideMove);
        }
        function slideFinish() {
            /* The slider is no longer clicked: */
            clicked = 0;
        }
        function slideMove(e) {
            var pos;
            /* If the slider is no longer clicked, exit this function: */
            if (clicked == 0) return false;
            /* Get the cursor's x position: */
            pos = getCursorPos(e)
            /* Prevent the slider from being positioned outside the image: */
            if (pos < 0) pos = 0;
            if (pos > w) pos = w;
            /* Execute a function that will resize the overlay image according to the cursor: */
            slide(pos);
        }
        function getCursorPos(e) {
            var a, x = 0;
            e = e || window.event;
            /* Get the x positions of the image: */
            a = img.getBoundingClientRect();
            /* Calculate the cursor's x coordinate, relative to the image: */
            x = e.pageX - a.left;
            /* Consider any page scrolling: */
            x = x - window.pageXOffset;
            return x;
        }
        function slide(x) {
            /* Resize the image: */
            img.style.width = x + "px";
            /* Position the slider: */
            slider.style.left = img.offsetWidth - (slider.offsetWidth / 2) + "px";
        }
    }
}

$(document).ajaxStop($.unblockUI);
(function(){var b,d,c;b=jQuery;c=(function(){function b(){this.fadeDuration=500;this.fitImagesInViewport=true;this.resizeDuration=700;this.showImageNumberLabel=true;this.wrapAround=false}b.prototype.albumLabel=function(b,c){return"Image "+b+" of "+c};return b})();d=(function(){function c(b){this.options=b;this.album=[];this.currentImageIndex=void 0;this.init()}c.prototype.init=function(){this.enable();return this.build()};c.prototype.enable=function(){var c=this;return b('body').on('click','a[rel^=lightbox], area[rel^=lightbox], a[data-lightbox], area[data-lightbox]',function(d){c.start(b(d.currentTarget));return false})};c.prototype.build=function(){var c=this;b("<div id='lightboxOverlay' class='lightboxOverlay'></div><div id='lightbox' class='lightbox'><div class='lb-outerContainer'><div class='lb-container'><img class='lb-image' src='' /><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(b('body'));this.$lightbox=b('#lightbox');this.$overlay=b('#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(){c.end();return false});this.$lightbox.hide().on('click',function(d){if(b(d.target).attr('id')==='lightbox'){c.end()}return false});this.$outerContainer.on('click',function(d){if(b(d.target).attr('id')==='lightbox'){c.end()}return false});this.$lightbox.find('.lb-prev').on('click',function(){if(c.currentImageIndex===0){c.changeImage(c.album.length-1)}else{c.changeImage(c.currentImageIndex-1)}return false});this.$lightbox.find('.lb-next').on('click',function(){if(c.currentImageIndex===c.album.length-1){c.changeImage(0)}else{c.changeImage(c.currentImageIndex+1)}return false});return this.$lightbox.find('.lb-loader, .lb-close').on('click',function(){c.end();return false})};c.prototype.start=function(c){var f,e,j,d,g,n,o,k,l,m,p,h,i;b(window).on("resize",this.sizeOverlay);b('select, object, embed').css({visibility:"hidden"});this.$overlay.width(b(document).width()).height(b(document).height()).fadeIn(this.options.fadeDuration);this.album=[];g=0;j=c.attr('data-lightbox');if(j){h=b(c.prop("tagName")+'[data-lightbox="'+j+'"]');for(d=k=0,m=h.length;k<m;d=++k){e=h[d];this.album.push({link:b(e).attr('href'),title:b(e).attr('title')});if(b(e).attr('href')===c.attr('href')){g=d}}}else{if(c.attr('rel')==='lightbox'){this.album.push({link:c.attr('href'),title:c.attr('title')})}else{i=b(c.prop("tagName")+'[rel="'+c.attr('rel')+'"]');for(d=l=0,p=i.length;l<p;d=++l){e=i[d];this.album.push({link:b(e).attr('href'),title:b(e).attr('title')});if(b(e).attr('href')===c.attr('href')){g=d}}}}f=b(window);o=f.scrollTop()+f.height()/10;n=f.scrollLeft();this.$lightbox.css({top:o+'px',left:n+'px'}).fadeIn(this.options.fadeDuration);this.changeImage(g)};c.prototype.changeImage=function(f){var d,c,e=this;this.disableKeyboardNav();d=this.$lightbox.find('.lb-image');this.sizeOverlay();this.$overlay.fadeIn(this.options.fadeDuration);b('.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');c=new Image();c.onload=function(){var m,g,h,i,j,k,l;d.attr('src',e.album[f].link);m=b(c);d.width(c.width);d.height(c.height);if(e.options.fitImagesInViewport){l=b(window).width();k=b(window).height();j=l-e.containerLeftPadding-e.containerRightPadding-20;i=k-e.containerTopPadding-e.containerBottomPadding-110;if((c.width>j)||(c.height>i)){if((c.width/j)>(c.height/i)){h=j;g=parseInt(c.height/(c.width/h),10);d.width(h);d.height(g)}else{g=i;h=parseInt(c.width/(c.height/g),10);d.width(h);d.height(g)}}}return e.sizeContainer(d.width(),d.height())};c.src=this.album[f].link;this.currentImageIndex=f};c.prototype.sizeOverlay=function(){return b('#lightboxOverlay').width(b(document).width()).height(b(document).height())};c.prototype.sizeContainer=function(f,g){var b,d,e,h,c=this;h=this.$outerContainer.outerWidth();e=this.$outerContainer.outerHeight();d=f+this.containerLeftPadding+this.containerRightPadding;b=g+this.containerTopPadding+this.containerBottomPadding;this.$outerContainer.animate({width:d,height:b},this.options.resizeDuration,'swing');setTimeout(function(){c.$lightbox.find('.lb-dataContainer').width(d);c.$lightbox.find('.lb-prevLink').height(b);c.$lightbox.find('.lb-nextLink').height(b);c.showImage()},this.options.resizeDuration)};c.prototype.showImage=function(){this.$lightbox.find('.lb-loader').hide();this.$lightbox.find('.lb-image').fadeIn('slow');this.updateNav();this.updateDetails();this.preloadNeighboringImages();this.enableKeyboardNav()};c.prototype.updateNav=function(){this.$lightbox.find('.lb-nav').show();if(this.album.length>1){if(this.options.wrapAround){this.$lightbox.find('.lb-prev, .lb-next').show()}else{if(this.currentImageIndex>0){this.$lightbox.find('.lb-prev').show()}if(this.currentImageIndex<this.album.length-1){this.$lightbox.find('.lb-next').show()}}}};c.prototype.updateDetails=function(){var b=this;if(typeof this.album[this.currentImageIndex].title!=='undefined'&&this.album[this.currentImageIndex].title!==""){this.$lightbox.find('.lb-caption').html(this.album[this.currentImageIndex].title).fadeIn('fast')}if(this.album.length>1&&this.options.showImageNumberLabel){this.$lightbox.find('.lb-number').text(this.options.albumLabel(this.currentImageIndex+1,this.album.length)).fadeIn('fast')}else{this.$lightbox.find('.lb-number').hide()}this.$outerContainer.removeClass('animating');this.$lightbox.find('.lb-dataContainer').fadeIn(this.resizeDuration,function(){return b.sizeOverlay()})};c.prototype.preloadNeighboringImages=function(){var c,b;if(this.album.length>this.currentImageIndex+1){c=new Image();c.src=this.album[this.currentImageIndex+1].link}if(this.currentImageIndex>0){b=new Image();b.src=this.album[this.currentImageIndex-1].link}};c.prototype.enableKeyboardNav=function(){b(document).on('keyup.keyboard',b.proxy(this.keyboardAction,this))};c.prototype.disableKeyboardNav=function(){b(document).off('.keyboard')};c.prototype.keyboardAction=function(g){var d,e,f,c,b;d=27;e=37;f=39;b=g.keyCode;c=String.fromCharCode(b).toLowerCase();if(b===d||c.match(/x|o|c/)){this.end()}else if(c==='p'||b===e){if(this.currentImageIndex!==0){this.changeImage(this.currentImageIndex-1)}}else if(c==='n'||b===f){if(this.currentImageIndex!==this.album.length-1){this.changeImage(this.currentImageIndex+1)}}};c.prototype.end=function(){this.disableKeyboardNav();b(window).off("resize",this.sizeOverlay);this.$lightbox.fadeOut(this.options.fadeDuration);this.$overlay.fadeOut(this.options.fadeDuration);return b('select, object, embed').css({visibility:"visible"})};return c})();b(function(){var e,b;b=new c();return e=new d(b)})}).call(this);
/*!
imgLiquid v0.9.944 / 03-05-2013
jQuery plugin to resize images to fit in a container.
Copyright (c) 2012 Alejandro Emparan (karacas) @krc_ale
Dual licensed under the MIT and GPL licenses
https://github.com/karacas/imgLiquid
**/
/*
ex:
	$('.imgLiquid').imgLiquid({fill:true});

	// OPTIONS:

	> js:
			fill: true,
			verticalAlign:		// 'center' //	'top'	//	'bottom' // '50%'  // '10%'
			horizontalAlign:	// 'center' //	'left'	//	'right'  // '50%'  // '10%'

	> CallBacks:
			onStart:		function(){},
			onFinish:		function(){},
			onItemStart:	function(index, container, img){},
			onItemFinish:	function(index, container, img){}

	> hml5 data attr (overwrite all)
			data-imgLiquid-fill='true'
			data-imgLiquid-horizontalAlign='center'
			data-imgLiquid-verticalAlign='center'
*/
//


var imgLiquid = imgLiquid || { VER: '0.9.944' };
imgLiquid.bgs_Available = false;
imgLiquid.bgs_CheckRunned = false;
imgLiquid.injectCss = '.imgLiquid img {visibility:hidden}';


(function ($) {

    // ___________________________________________________________________

    function checkBgsIsavailable() {
        if (imgLiquid.bgs_CheckRunned) return;
        else imgLiquid.bgs_CheckRunned = true;

        var spanBgs = $('<span style="background-size:cover" />');
        $('body').append(spanBgs);

        !function () {
            var bgs_Check = spanBgs[0];
            if (!bgs_Check || !window.getComputedStyle) return;
            var compStyle = window.getComputedStyle(bgs_Check, null);
            if (!compStyle || !compStyle.backgroundSize) return;
            imgLiquid.bgs_Available = (compStyle.backgroundSize === 'cover');
        }();

        spanBgs.remove();
    }





    // ___________________________________________________________________

    $.fn.extend({
        imgLiquid: function (options) {

            this.defaults = {
                fill: true,
                verticalAlign: 'center',			//	'top'	//	'bottom' // '50%'  // '10%'
                horizontalAlign: 'center',			//	'left'	//	'right'  // '50%'  // '10%'
                useBackgroundSize: true,
                useDataHtmlAttr: true,

                responsive: true,					/* Only for use with BackgroundSize false (or old browsers) */
                delay: 0,							/* Only for use with BackgroundSize false (or old browsers) */
                fadeInTime: 0,						/* Only for use with BackgroundSize false (or old browsers) */
                removeBoxBackground: true,			/* Only for use with BackgroundSize false (or old browsers) */
                hardPixels: true,					/* Only for use with BackgroundSize false (or old browsers) */
                responsiveCheckTime: 500,			/* Only for use with BackgroundSize false (or old browsers) */ /* time to check div resize */
                timecheckvisibility: 500,			/* Only for use with BackgroundSize false (or old browsers) */ /* time to recheck if visible/loaded */

                // CALLBACKS
                onStart: null,						// no-params
                onFinish: null,						// no-params
                onItemStart: null,					// params: (index, container, img )
                onItemFinish: null,					// params: (index, container, img )
                onItemError: null					// params: (index, container, img )
            };


            checkBgsIsavailable();
            var imgLiquidRoot = this;

            // Extend global settings
            this.options = options;
            this.settings = $.extend({}, this.defaults, this.options);

            // CallBack
            if (this.settings.onStart) this.settings.onStart();




            // ___________________________________________________________________

            return this.each(function ($i) {

                // MAIN >> each for image

                var settings = imgLiquidRoot.settings,
				$imgBoxCont = $(this),
				$img = $('img:first', $imgBoxCont);
                if (!$img.length) { onError(); return; }


                // Extend settings
                if (!$img.data('imgLiquid_settings')) {
                    // First time
                    settings = $.extend({}, imgLiquidRoot.settings, getSettingsOverwrite());
                } else {
                    // Recall
                    // Remove Classes
                    $imgBoxCont.removeClass('imgLiquid_error').removeClass('imgLiquid_ready');
                    settings = $.extend({}, $img.data('imgLiquid_settings'), imgLiquidRoot.options);
                }
                $img.data('imgLiquid_settings', settings);


                // Start CallBack
                if (settings.onItemStart) settings.onItemStart($i, $imgBoxCont, $img); /* << CallBack */


                // Process
                if (imgLiquid.bgs_Available && settings.useBackgroundSize)
                    processBgSize();
                else
                    processOldMethod();


                // END MAIN <<




                // ___________________________________________________________________

                function processBgSize() {

                    // Check change img src
                    if ($imgBoxCont.css('background-image').indexOf(encodeURI($img.attr('src'))) === -1) {
                        // Change
                        $imgBoxCont.css({ 'background-image': 'Url("' + encodeURI($img.attr('src')) + '")' });
                    }

                    $imgBoxCont.css({
                        'background-size': (settings.fill) ? 'cover' : 'contain',
                        'background-position': (settings.horizontalAlign + ' ' + settings.verticalAlign).toLowerCase(),
                        'background-repeat': 'no-repeat'
                    });

                    $('a:first', $imgBoxCont).css({
                        'display': 'block',
                        'width': '100%',
                        'height': '100%'
                    });

                    $('img', $imgBoxCont).css({ 'display': 'none' });

                    if (settings.onItemFinish) settings.onItemFinish($i, $imgBoxCont, $img); /* << CallBack */

                    $imgBoxCont.addClass('imgLiquid_bgSize');
                    $imgBoxCont.addClass('imgLiquid_ready');
                    checkFinish();
                }




                // ___________________________________________________________________

                function processOldMethod() {

                    // Check change img src
                    if ($img.data('oldSrc') && $img.data('oldSrc') !== $img.attr('src')) {

                        /* Clone & Reset img */
                        var $imgCopy = $img.clone().removeAttr('style');
                        $imgCopy.data('imgLiquid_settings', $img.data('imgLiquid_settings'));
                        $img.parent().prepend($imgCopy);
                        $img.remove();
                        $img = $imgCopy;
                        $img[0].width = 0;

                        // Bug ie with > if (!$img[0].complete && $img[0].width) onError();
                        setTimeout(processOldMethod, 10);
                        return;
                    }


                    // Reproceess?
                    if ($img.data('imgLiquid_oldProcessed')) {
                        makeOldProcess(); return;
                    }


                    // Set data
                    $img.data('imgLiquid_oldProcessed', false);
                    $img.data('oldSrc', $img.attr('src'));


                    // Hide others images
                    $('img:not(:first)', $imgBoxCont).css('display', 'none');


                    // CSSs
                    $imgBoxCont.css({ 'overflow': 'hidden' });
                    $img.fadeTo(0, 0).removeAttr('width').removeAttr('height').css({
                        'visibility': 'visible',
                        'max-width': 'none',
                        'max-height': 'none',
                        'width': 'auto',
                        'height': 'auto',
                        'display': 'block'
                    });


                    // CheckErrors
                    $img.on('error', onError);
                    $img[0].onerror = onError;


                    // loop until load
                    function onLoad() {
                        if ($img.data('imgLiquid_error') || $img.data('imgLiquid_loaded') || $img.data('imgLiquid_oldProcessed')) return;
                        if ($imgBoxCont.is(':visible') && $img[0].complete && $img[0].width > 0 && $img[0].height > 0) {
                            $img.data('imgLiquid_loaded', true);
                            setTimeout(makeOldProcess, $i * settings.delay);
                        } else {
                            setTimeout(onLoad, settings.timecheckvisibility);
                        }
                    }


                    onLoad();
                    checkResponsive();
                }




                // ___________________________________________________________________

                function checkResponsive() {

                    /* Only for oldProcessed method (background-size dont need) */

                    if (!settings.responsive && !$img.data('imgLiquid_oldProcessed')) return;
                    if (!$img.data('imgLiquid_settings')) return;

                    settings = $img.data('imgLiquid_settings');

                    $imgBoxCont.actualSize = $imgBoxCont.get(0).offsetWidth + ($imgBoxCont.get(0).offsetHeight / 10000);
                    if ($imgBoxCont.sizeOld && $imgBoxCont.actualSize !== $imgBoxCont.sizeOld) makeOldProcess();

                    $imgBoxCont.sizeOld = $imgBoxCont.actualSize;
                    setTimeout(checkResponsive, settings.responsiveCheckTime);
                }




                // ___________________________________________________________________

                function onError() {
                    $img.data('imgLiquid_error', true);
                    $imgBoxCont.addClass('imgLiquid_error');
                    if (settings.onItemError) settings.onItemError($i, $imgBoxCont, $img); /* << CallBack */
                    checkFinish();
                }




                // ___________________________________________________________________

                function getSettingsOverwrite() {
                    var SettingsOverwrite = {};

                    if (imgLiquidRoot.settings.useDataHtmlAttr) {
                        var dif = $imgBoxCont.attr('data-imgLiquid-fill'),
						ha = $imgBoxCont.attr('data-imgLiquid-horizontalAlign'),
						va = $imgBoxCont.attr('data-imgLiquid-verticalAlign');

                        if (dif === 'true' || dif === 'false') SettingsOverwrite.fill = Boolean(dif === 'true');
                        if (ha !== undefined && (ha === 'left' || ha === 'center' || ha === 'right' || ha.indexOf('%') !== -1)) SettingsOverwrite.horizontalAlign = ha;
                        if (va !== undefined && (va === 'top' || va === 'bottom' || va === 'center' || va.indexOf('%') !== -1)) SettingsOverwrite.verticalAlign = va;
                    }

                    if (imgLiquid.isIE && imgLiquidRoot.settings.ieFadeInDisabled) SettingsOverwrite.fadeInTime = 0; //ie no anims
                    return SettingsOverwrite;
                }





                // ___________________________________________________________________

                function makeOldProcess() { /* Only for old browsers, or useBackgroundSize seted false */

                    // Calculate size
                    var w, h, wn, hn, ha, va, hdif, vdif,
					margT = 0,
					margL = 0,
					$imgCW = $imgBoxCont.width(),
					$imgCH = $imgBoxCont.height();


                    // Save original sizes
                    if ($img.data('owidth') === undefined) $img.data('owidth', $img[0].width);
                    if ($img.data('oheight') === undefined) $img.data('oheight', $img[0].height);


                    // Compare ratio
                    if (settings.fill === ($imgCW / $imgCH) >= ($img.data('owidth') / $img.data('oheight'))) {
                        w = '100%';
                        h = 'auto';
                        wn = Math.floor($imgCW);
                        hn = Math.floor($imgCW * ($img.data('oheight') / $img.data('owidth')));
                    } else {
                        w = 'auto';
                        h = '100%';
                        wn = Math.floor($imgCH * ($img.data('owidth') / $img.data('oheight')));
                        hn = Math.floor($imgCH);
                    }

                    // Align X
                    ha = settings.horizontalAlign.toLowerCase();
                    hdif = $imgCW - wn;
                    if (ha === 'left') margL = 0;
                    if (ha === 'center') margL = hdif * 0.5;
                    if (ha === 'right') margL = hdif;
                    if (ha.indexOf('%') !== -1) {
                        ha = parseInt(ha.replace('%', ''), 10);
                        if (ha > 0) margL = hdif * ha * 0.01;
                    }


                    // Align Y
                    va = settings.verticalAlign.toLowerCase();
                    vdif = $imgCH - hn;
                    if (va === 'left') margT = 0;
                    if (va === 'center') margT = vdif * 0.5;
                    if (va === 'bottom') margT = vdif;
                    if (va.indexOf('%') !== -1) {
                        va = parseInt(va.replace('%', ''), 10);
                        if (va > 0) margT = vdif * va * 0.01;
                    }


                    // Add Css
                    if (settings.hardPixels) { w = wn; h = hn; }
                    $img.css({
                        'width': w,
                        'height': h,
                        'margin-left': Math.floor(margL),
                        'margin-top': Math.floor(margT)
                    });


                    // FadeIn > Only first time
                    if (!$img.data('imgLiquid_oldProcessed')) {
                        $img.fadeTo(settings.fadeInTime, 1);
                        $img.data('imgLiquid_oldProcessed', true);
                        if (settings.removeBoxBackground) $imgBoxCont.css('background-image', 'none');
                        $imgBoxCont.addClass('imgLiquid_nobgSize');
                        $imgBoxCont.addClass('imgLiquid_ready');
                    }


                    if (settings.onItemFinish) settings.onItemFinish($i, $imgBoxCont, $img); /* << CallBack */
                    checkFinish();
                }




                // ___________________________________________________________________

                function checkFinish() { /* Check callBack */
                    if ($i === imgLiquidRoot.length - 1) if (imgLiquidRoot.settings.onFinish) imgLiquidRoot.settings.onFinish();
                }


            });
        }
    });
})(jQuery);



// Inject css styles ______________________________________________________
!function () {
    var css = imgLiquid.injectCss,
	head = document.getElementsByTagName('head')[0],
	style = document.createElement('style');
    style.type = 'text/css';
    if (style.styleSheet) {
        style.styleSheet.cssText = css;
    } else {
        style.appendChild(document.createTextNode(css));
    }
    head.appendChild(style);
}();
