');
+ }
+
+ item.inlineElement = el;
+ return el;
+ }
+
+ mfp.updateStatus('ready');
+ mfp._parseMarkup(template, {}, item);
+ return template;
+ }
+ }
+});
+
+/*>>inline*/
+
+/*>>ajax*/
+var AJAX_NS = 'ajax',
+ _ajaxCur,
+ _removeAjaxCursor = function() {
+ if(_ajaxCur) {
+ _body.removeClass(_ajaxCur);
+ }
+ },
+ _destroyAjaxRequest = function() {
+ _removeAjaxCursor();
+ if(mfp.req) {
+ mfp.req.abort();
+ }
+ };
+
+$.magnificPopup.registerModule(AJAX_NS, {
+
+ options: {
+ settings: null,
+ cursor: 'mfp-ajax-cur',
+ tError: '
The content could not be loaded.'
+ },
+
+ proto: {
+ initAjax: function() {
+ mfp.types.push(AJAX_NS);
+ _ajaxCur = mfp.st.ajax.cursor;
+
+ _mfpOn(CLOSE_EVENT+'.'+AJAX_NS, _destroyAjaxRequest);
+ _mfpOn('BeforeChange.' + AJAX_NS, _destroyAjaxRequest);
+ },
+ getAjax: function(item) {
+
+ if(_ajaxCur)
+ _body.addClass(_ajaxCur);
+
+ mfp.updateStatus('loading');
+
+ var opts = $.extend({
+ url: item.src,
+ success: function(data, textStatus, jqXHR) {
+ var temp = {
+ data:data,
+ xhr:jqXHR
+ };
+
+ _mfpTrigger('ParseAjax', temp);
+
+ mfp.appendContent( $(temp.data), AJAX_NS );
+
+ item.finished = true;
+
+ _removeAjaxCursor();
+
+ mfp._setFocus();
+
+ setTimeout(function() {
+ mfp.wrap.addClass(READY_CLASS);
+ }, 16);
+
+ mfp.updateStatus('ready');
+
+ _mfpTrigger('AjaxContentAdded');
+ },
+ error: function() {
+ _removeAjaxCursor();
+ item.finished = item.loadError = true;
+ mfp.updateStatus('error', mfp.st.ajax.tError.replace('%url%', item.src));
+ }
+ }, mfp.st.ajax.settings);
+
+ mfp.req = $.ajax(opts);
+
+ return '';
+ }
+ }
+});
+
+
+
+
+
+
+
+/*>>ajax*/
+
+/*>>image*/
+var _imgInterval,
+ _getTitle = function(item) {
+ if(item.data && item.data.title !== undefined)
+ return item.data.title;
+
+ var src = mfp.st.image.titleSrc;
+
+ if(src) {
+ if($.isFunction(src)) {
+ return src.call(mfp, item);
+ } else if(item.el) {
+ return item.el.attr(src) || '';
+ }
+ }
+ return '';
+ };
+
+$.magnificPopup.registerModule('image', {
+
+ options: {
+ markup: '
',
+ cursor: 'mfp-zoom-out-cur',
+ titleSrc: 'title',
+ verticalFit: true,
+ tError: '
The image could not be loaded.'
+ },
+
+ proto: {
+ initImage: function() {
+ var imgSt = mfp.st.image,
+ ns = '.image';
+
+ mfp.types.push('image');
+
+ _mfpOn(OPEN_EVENT+ns, function() {
+ if(mfp.currItem.type === 'image' && imgSt.cursor) {
+ _body.addClass(imgSt.cursor);
+ }
+ });
+
+ _mfpOn(CLOSE_EVENT+ns, function() {
+ if(imgSt.cursor) {
+ _body.removeClass(imgSt.cursor);
+ }
+ _window.off('resize' + EVENT_NS);
+ });
+
+ _mfpOn('Resize'+ns, mfp.resizeImage);
+ if(mfp.isLowIE) {
+ _mfpOn('AfterChange', mfp.resizeImage);
+ }
+ },
+ resizeImage: function() {
+ var item = mfp.currItem;
+ if(!item || !item.img) return;
+
+ if(mfp.st.image.verticalFit) {
+ var decr = 0;
+ // fix box-sizing in ie7/8
+ if(mfp.isLowIE) {
+ decr = parseInt(item.img.css('padding-top'), 10) + parseInt(item.img.css('padding-bottom'),10);
+ }
+ item.img.css('max-height', mfp.wH-decr);
+ }
+ },
+ _onImageHasSize: function(item) {
+ if(item.img) {
+
+ item.hasSize = true;
+
+ if(_imgInterval) {
+ clearInterval(_imgInterval);
+ }
+
+ item.isCheckingImgSize = false;
+
+ _mfpTrigger('ImageHasSize', item);
+
+ if(item.imgHidden) {
+ if(mfp.content)
+ mfp.content.removeClass('mfp-loading');
+
+ item.imgHidden = false;
+ }
+
+ }
+ },
+
+ /**
+ * Function that loops until the image has size to display elements that rely on it asap
+ */
+ findImageSize: function(item) {
+
+ var counter = 0,
+ img = item.img[0],
+ mfpSetInterval = function(delay) {
+
+ if(_imgInterval) {
+ clearInterval(_imgInterval);
+ }
+ // decelerating interval that checks for size of an image
+ _imgInterval = setInterval(function() {
+ if(img.naturalWidth > 0) {
+ mfp._onImageHasSize(item);
+ return;
+ }
+
+ if(counter > 200) {
+ clearInterval(_imgInterval);
+ }
+
+ counter++;
+ if(counter === 3) {
+ mfpSetInterval(10);
+ } else if(counter === 40) {
+ mfpSetInterval(50);
+ } else if(counter === 100) {
+ mfpSetInterval(500);
+ }
+ }, delay);
+ };
+
+ mfpSetInterval(1);
+ },
+
+ getImage: function(item, template) {
+
+ var guard = 0,
+
+ // image load complete handler
+ onLoadComplete = function() {
+ if(item) {
+ if (item.img[0].complete) {
+ item.img.off('.mfploader');
+
+ if(item === mfp.currItem){
+ mfp._onImageHasSize(item);
+
+ mfp.updateStatus('ready');
+ }
+
+ item.hasSize = true;
+ item.loaded = true;
+
+ _mfpTrigger('ImageLoadComplete');
+
+ }
+ else {
+ // if image complete check fails 200 times (20 sec), we assume that there was an error.
+ guard++;
+ if(guard < 200) {
+ setTimeout(onLoadComplete,100);
+ } else {
+ onLoadError();
+ }
+ }
+ }
+ },
+
+ // image error handler
+ onLoadError = function() {
+ if(item) {
+ item.img.off('.mfploader');
+ if(item === mfp.currItem){
+ mfp._onImageHasSize(item);
+ mfp.updateStatus('error', imgSt.tError.replace('%url%', item.src) );
+ }
+
+ item.hasSize = true;
+ item.loaded = true;
+ item.loadError = true;
+ }
+ },
+ imgSt = mfp.st.image;
+
+
+ var el = template.find('.mfp-img');
+ if(el.length) {
+ var img = document.createElement('img');
+ img.className = 'mfp-img';
+ item.img = $(img).on('load.mfploader', onLoadComplete).on('error.mfploader', onLoadError);
+ img.src = item.src;
+
+ // without clone() "error" event is not firing when IMG is replaced by new IMG
+ // TODO: find a way to avoid such cloning
+ if(el.is('img')) {
+ item.img = item.img.clone();
+ }
+
+ img = item.img[0];
+ if(img.naturalWidth > 0) {
+ item.hasSize = true;
+ } else if(!img.width) {
+ item.hasSize = false;
+ }
+ }
+
+ mfp._parseMarkup(template, {
+ title: _getTitle(item),
+ img_replaceWith: item.img
+ }, item);
+
+ mfp.resizeImage();
+
+ if(item.hasSize) {
+ if(_imgInterval) clearInterval(_imgInterval);
+
+ if(item.loadError) {
+ template.addClass('mfp-loading');
+ mfp.updateStatus('error', imgSt.tError.replace('%url%', item.src) );
+ } else {
+ template.removeClass('mfp-loading');
+ mfp.updateStatus('ready');
+ }
+ return template;
+ }
+
+ mfp.updateStatus('loading');
+ item.loading = true;
+
+ if(!item.hasSize) {
+ item.imgHidden = true;
+ template.addClass('mfp-loading');
+ mfp.findImageSize(item);
+ }
+
+ return template;
+ }
+ }
+});
+
+
+
+/*>>image*/
+
+/*>>zoom*/
+var hasMozTransform,
+ getHasMozTransform = function() {
+ if(hasMozTransform === undefined) {
+ hasMozTransform = document.createElement('p').style.MozTransform !== undefined;
+ }
+ return hasMozTransform;
+ };
+
+$.magnificPopup.registerModule('zoom', {
+
+ options: {
+ enabled: false,
+ easing: 'ease-in-out',
+ duration: 300,
+ opener: function(element) {
+ return element.is('img') ? element : element.find('img');
+ }
+ },
+
+ proto: {
+
+ initZoom: function() {
+ var zoomSt = mfp.st.zoom,
+ ns = '.zoom',
+ image;
+
+ if(!zoomSt.enabled || !mfp.supportsTransition) {
+ return;
+ }
+
+ var duration = zoomSt.duration,
+ getElToAnimate = function(image) {
+ var newImg = image.clone().removeAttr('style').removeAttr('class').addClass('mfp-animated-image'),
+ transition = 'all '+(zoomSt.duration/1000)+'s ' + zoomSt.easing,
+ cssObj = {
+ position: 'fixed',
+ zIndex: 9999,
+ left: 0,
+ top: 0,
+ '-webkit-backface-visibility': 'hidden'
+ },
+ t = 'transition';
+
+ cssObj['-webkit-'+t] = cssObj['-moz-'+t] = cssObj['-o-'+t] = cssObj[t] = transition;
+
+ newImg.css(cssObj);
+ return newImg;
+ },
+ showMainContent = function() {
+ mfp.content.css('visibility', 'visible');
+ },
+ openTimeout,
+ animatedImg;
+
+ _mfpOn('BuildControls'+ns, function() {
+ if(mfp._allowZoom()) {
+
+ clearTimeout(openTimeout);
+ mfp.content.css('visibility', 'hidden');
+
+ // Basically, all code below does is clones existing image, puts in on top of the current one and animated it
+
+ image = mfp._getItemToZoom();
+
+ if(!image) {
+ showMainContent();
+ return;
+ }
+
+ animatedImg = getElToAnimate(image);
+
+ animatedImg.css( mfp._getOffset() );
+
+ mfp.wrap.append(animatedImg);
+
+ openTimeout = setTimeout(function() {
+ animatedImg.css( mfp._getOffset( true ) );
+ openTimeout = setTimeout(function() {
+
+ showMainContent();
+
+ setTimeout(function() {
+ animatedImg.remove();
+ image = animatedImg = null;
+ _mfpTrigger('ZoomAnimationEnded');
+ }, 16); // avoid blink when switching images
+
+ }, duration); // this timeout equals animation duration
+
+ }, 16); // by adding this timeout we avoid short glitch at the beginning of animation
+
+
+ // Lots of timeouts...
+ }
+ });
+ _mfpOn(BEFORE_CLOSE_EVENT+ns, function() {
+ if(mfp._allowZoom()) {
+
+ clearTimeout(openTimeout);
+
+ mfp.st.removalDelay = duration;
+
+ if(!image) {
+ image = mfp._getItemToZoom();
+ if(!image) {
+ return;
+ }
+ animatedImg = getElToAnimate(image);
+ }
+
+
+ animatedImg.css( mfp._getOffset(true) );
+ mfp.wrap.append(animatedImg);
+ mfp.content.css('visibility', 'hidden');
+
+ setTimeout(function() {
+ animatedImg.css( mfp._getOffset() );
+ }, 16);
+ }
+
+ });
+
+ _mfpOn(CLOSE_EVENT+ns, function() {
+ if(mfp._allowZoom()) {
+ showMainContent();
+ if(animatedImg) {
+ animatedImg.remove();
+ }
+ image = null;
+ }
+ });
+ },
+
+ _allowZoom: function() {
+ return mfp.currItem.type === 'image';
+ },
+
+ _getItemToZoom: function() {
+ if(mfp.currItem.hasSize) {
+ return mfp.currItem.img;
+ } else {
+ return false;
+ }
+ },
+
+ // Get element postion relative to viewport
+ _getOffset: function(isLarge) {
+ var el;
+ if(isLarge) {
+ el = mfp.currItem.img;
+ } else {
+ el = mfp.st.zoom.opener(mfp.currItem.el || mfp.currItem);
+ }
+
+ var offset = el.offset();
+ var paddingTop = parseInt(el.css('padding-top'),10);
+ var paddingBottom = parseInt(el.css('padding-bottom'),10);
+ offset.top -= ( $(window).scrollTop() - paddingTop );
+
+
+ /*
+
+ Animating left + top + width/height looks glitchy in Firefox, but perfect in Chrome. And vice-versa.
+
+ */
+ var obj = {
+ width: el.width(),
+ // fix Zepto height+padding issue
+ height: (_isJQ ? el.innerHeight() : el[0].offsetHeight) - paddingBottom - paddingTop
+ };
+
+ // I hate to do this, but there is no another option
+ if( getHasMozTransform() ) {
+ obj['-moz-transform'] = obj['transform'] = 'translate(' + offset.left + 'px,' + offset.top + 'px)';
+ } else {
+ obj.left = offset.left;
+ obj.top = offset.top;
+ }
+ return obj;
+ }
+
+ }
+});
+
+
+
+/*>>zoom*/
+
+/*>>iframe*/
+
+var IFRAME_NS = 'iframe',
+ _emptyPage = '//about:blank',
+
+ _fixIframeBugs = function(isShowing) {
+ if(mfp.currTemplate[IFRAME_NS]) {
+ var el = mfp.currTemplate[IFRAME_NS].find('iframe');
+ if(el.length) {
+ // reset src after the popup is closed to avoid "video keeps playing after popup is closed" bug
+ if(!isShowing) {
+ el[0].src = _emptyPage;
+ }
+
+ // IE8 black screen bug fix
+ if(mfp.isIE8) {
+ el.css('display', isShowing ? 'block' : 'none');
+ }
+ }
+ }
+ };
+
+$.magnificPopup.registerModule(IFRAME_NS, {
+
+ options: {
+ markup: '
',
+
+ srcAction: 'iframe_src',
+
+ // we don't care and support only one default type of URL by default
+ patterns: {
+ youtube: {
+ index: 'youtube.com',
+ id: 'v=',
+ src: '//www.youtube.com/embed/%id%?autoplay=1'
+ },
+ vimeo: {
+ index: 'vimeo.com/',
+ id: '/',
+ src: '//player.vimeo.com/video/%id%?autoplay=1'
+ },
+ gmaps: {
+ index: '//maps.google.',
+ src: '%id%&output=embed'
+ }
+ }
+ },
+
+ proto: {
+ initIframe: function() {
+ mfp.types.push(IFRAME_NS);
+
+ _mfpOn('BeforeChange', function(e, prevType, newType) {
+ if(prevType !== newType) {
+ if(prevType === IFRAME_NS) {
+ _fixIframeBugs(); // iframe if removed
+ } else if(newType === IFRAME_NS) {
+ _fixIframeBugs(true); // iframe is showing
+ }
+ }// else {
+ // iframe source is switched, don't do anything
+ //}
+ });
+
+ _mfpOn(CLOSE_EVENT + '.' + IFRAME_NS, function() {
+ _fixIframeBugs();
+ });
+ },
+
+ getIframe: function(item, template) {
+ var embedSrc = item.src;
+ var iframeSt = mfp.st.iframe;
+
+ $.each(iframeSt.patterns, function() {
+ if(embedSrc.indexOf( this.index ) > -1) {
+ if(this.id) {
+ if(typeof this.id === 'string') {
+ embedSrc = embedSrc.substr(embedSrc.lastIndexOf(this.id)+this.id.length, embedSrc.length);
+ } else {
+ embedSrc = this.id.call( this, embedSrc );
+ }
+ }
+ embedSrc = this.src.replace('%id%', embedSrc );
+ return false; // break;
+ }
+ });
+
+ var dataObj = {};
+ if(iframeSt.srcAction) {
+ dataObj[iframeSt.srcAction] = embedSrc;
+ }
+ mfp._parseMarkup(template, dataObj, item);
+
+ mfp.updateStatus('ready');
+
+ return template;
+ }
+ }
+});
+
+
+
+/*>>iframe*/
+
+/*>>gallery*/
+/**
+ * Get looped index depending on number of slides
+ */
+var _getLoopedId = function(index) {
+ var numSlides = mfp.items.length;
+ if(index > numSlides - 1) {
+ return index - numSlides;
+ } else if(index < 0) {
+ return numSlides + index;
+ }
+ return index;
+ },
+ _replaceCurrTotal = function(text, curr, total) {
+ return text.replace(/%curr%/gi, curr + 1).replace(/%total%/gi, total);
+ };
+
+$.magnificPopup.registerModule('gallery', {
+
+ options: {
+ enabled: false,
+ arrowMarkup: '
',
+ preload: [0,2],
+ navigateByImgClick: true,
+ arrows: true,
+
+ tPrev: 'Previous (Left arrow key)',
+ tNext: 'Next (Right arrow key)',
+ tCounter: '%curr% of %total%'
+ },
+
+ proto: {
+ initGallery: function() {
+
+ var gSt = mfp.st.gallery,
+ ns = '.mfp-gallery',
+ supportsFastClick = Boolean($.fn.mfpFastClick);
+
+ mfp.direction = true; // true - next, false - prev
+
+ if(!gSt || !gSt.enabled ) return false;
+
+ _wrapClasses += ' mfp-gallery';
+
+ _mfpOn(OPEN_EVENT+ns, function() {
+
+ if(gSt.navigateByImgClick) {
+ mfp.wrap.on('click'+ns, '.mfp-img', function() {
+ if(mfp.items.length > 1) {
+ mfp.next();
+ return false;
+ }
+ });
+ }
+
+ _document.on('keydown'+ns, function(e) {
+ if (e.keyCode === 37) {
+ mfp.prev();
+ } else if (e.keyCode === 39) {
+ mfp.next();
+ }
+ });
+ });
+
+ _mfpOn('UpdateStatus'+ns, function(e, data) {
+ if(data.text) {
+ data.text = _replaceCurrTotal(data.text, mfp.currItem.index, mfp.items.length);
+ }
+ });
+
+ _mfpOn(MARKUP_PARSE_EVENT+ns, function(e, element, values, item) {
+ var l = mfp.items.length;
+ values.counter = l > 1 ? _replaceCurrTotal(gSt.tCounter, item.index, l) : '';
+ });
+
+ _mfpOn('BuildControls' + ns, function() {
+ if(mfp.items.length > 1 && gSt.arrows && !mfp.arrowLeft) {
+ var markup = gSt.arrowMarkup,
+ arrowLeft = mfp.arrowLeft = $( markup.replace(/%title%/gi, gSt.tPrev).replace(/%dir%/gi, 'left') ).addClass(PREVENT_CLOSE_CLASS),
+ arrowRight = mfp.arrowRight = $( markup.replace(/%title%/gi, gSt.tNext).replace(/%dir%/gi, 'right') ).addClass(PREVENT_CLOSE_CLASS);
+
+ var eName = supportsFastClick ? 'mfpFastClick' : 'click';
+ arrowLeft[eName](function() {
+ mfp.prev();
+ });
+ arrowRight[eName](function() {
+ mfp.next();
+ });
+
+ // Polyfill for :before and :after (adds elements with classes mfp-a and mfp-b)
+ if(mfp.isIE7) {
+ _getEl('b', arrowLeft[0], false, true);
+ _getEl('a', arrowLeft[0], false, true);
+ _getEl('b', arrowRight[0], false, true);
+ _getEl('a', arrowRight[0], false, true);
+ }
+
+ mfp.container.append(arrowLeft.add(arrowRight));
+ }
+ });
+
+ _mfpOn(CHANGE_EVENT+ns, function() {
+ if(mfp._preloadTimeout) clearTimeout(mfp._preloadTimeout);
+
+ mfp._preloadTimeout = setTimeout(function() {
+ mfp.preloadNearbyImages();
+ mfp._preloadTimeout = null;
+ }, 16);
+ });
+
+
+ _mfpOn(CLOSE_EVENT+ns, function() {
+ _document.off(ns);
+ mfp.wrap.off('click'+ns);
+
+ if(mfp.arrowLeft && supportsFastClick) {
+ mfp.arrowLeft.add(mfp.arrowRight).destroyMfpFastClick();
+ }
+ mfp.arrowRight = mfp.arrowLeft = null;
+ });
+
+ },
+ next: function() {
+ mfp.direction = true;
+ mfp.index = _getLoopedId(mfp.index + 1);
+ mfp.updateItemHTML();
+ },
+ prev: function() {
+ mfp.direction = false;
+ mfp.index = _getLoopedId(mfp.index - 1);
+ mfp.updateItemHTML();
+ },
+ goTo: function(newIndex) {
+ mfp.direction = (newIndex >= mfp.index);
+ mfp.index = newIndex;
+ mfp.updateItemHTML();
+ },
+ preloadNearbyImages: function() {
+ var p = mfp.st.gallery.preload,
+ preloadBefore = Math.min(p[0], mfp.items.length),
+ preloadAfter = Math.min(p[1], mfp.items.length),
+ i;
+
+ for(i = 1; i <= (mfp.direction ? preloadAfter : preloadBefore); i++) {
+ mfp._preloadItem(mfp.index+i);
+ }
+ for(i = 1; i <= (mfp.direction ? preloadBefore : preloadAfter); i++) {
+ mfp._preloadItem(mfp.index-i);
+ }
+ },
+ _preloadItem: function(index) {
+ index = _getLoopedId(index);
+
+ if(mfp.items[index].preloaded) {
+ return;
+ }
+
+ var item = mfp.items[index];
+ if(!item.parsed) {
+ item = mfp.parseEl( index );
+ }
+
+ _mfpTrigger('LazyLoad', item);
+
+ if(item.type === 'image') {
+ item.img = $('
').on('load.mfploader', function() {
+ item.hasSize = true;
+ }).on('error.mfploader', function() {
+ item.hasSize = true;
+ item.loadError = true;
+ _mfpTrigger('LazyLoadError', item);
+ }).attr('src', item.src);
+ }
+
+
+ item.preloaded = true;
+ }
+ }
+});
+
+/*
+Touch Support that might be implemented some day
+
+addSwipeGesture: function() {
+ var startX,
+ moved,
+ multipleTouches;
+
+ return;
+
+ var namespace = '.mfp',
+ addEventNames = function(pref, down, move, up, cancel) {
+ mfp._tStart = pref + down + namespace;
+ mfp._tMove = pref + move + namespace;
+ mfp._tEnd = pref + up + namespace;
+ mfp._tCancel = pref + cancel + namespace;
+ };
+
+ if(window.navigator.msPointerEnabled) {
+ addEventNames('MSPointer', 'Down', 'Move', 'Up', 'Cancel');
+ } else if('ontouchstart' in window) {
+ addEventNames('touch', 'start', 'move', 'end', 'cancel');
+ } else {
+ return;
+ }
+ _window.on(mfp._tStart, function(e) {
+ var oE = e.originalEvent;
+ multipleTouches = moved = false;
+ startX = oE.pageX || oE.changedTouches[0].pageX;
+ }).on(mfp._tMove, function(e) {
+ if(e.originalEvent.touches.length > 1) {
+ multipleTouches = e.originalEvent.touches.length;
+ } else {
+ //e.preventDefault();
+ moved = true;
+ }
+ }).on(mfp._tEnd + ' ' + mfp._tCancel, function(e) {
+ if(moved && !multipleTouches) {
+ var oE = e.originalEvent,
+ diff = startX - (oE.pageX || oE.changedTouches[0].pageX);
+
+ if(diff > 20) {
+ mfp.next();
+ } else if(diff < -20) {
+ mfp.prev();
+ }
+ }
+ });
+},
+*/
+
+
+/*>>gallery*/
+
+/*>>retina*/
+
+var RETINA_NS = 'retina';
+
+$.magnificPopup.registerModule(RETINA_NS, {
+ options: {
+ replaceSrc: function(item) {
+ return item.src.replace(/\.\w+$/, function(m) { return '@2x' + m; });
+ },
+ ratio: 1 // Function or number. Set to 1 to disable.
+ },
+ proto: {
+ initRetina: function() {
+ if(window.devicePixelRatio > 1) {
+
+ var st = mfp.st.retina,
+ ratio = st.ratio;
+
+ ratio = !isNaN(ratio) ? ratio : ratio();
+
+ if(ratio > 1) {
+ _mfpOn('ImageHasSize' + '.' + RETINA_NS, function(e, item) {
+ item.img.css({
+ 'max-width': item.img[0].naturalWidth / ratio,
+ 'width': '100%'
+ });
+ });
+ _mfpOn('ElementParse' + '.' + RETINA_NS, function(e, item) {
+ item.src = st.replaceSrc(item, ratio);
+ });
+ }
+ }
+
+ }
+ }
+});
+
+/*>>retina*/
+
+/*>>fastclick*/
+/**
+ * FastClick event implementation. (removes 300ms delay on touch devices)
+ * Based on https://developers.google.com/mobile/articles/fast_buttons
+ *
+ * You may use it outside the Magnific Popup by calling just:
+ *
+ * $('.your-el').mfpFastClick(function() {
+ * console.log('Clicked!');
+ * });
+ *
+ * To unbind:
+ * $('.your-el').destroyMfpFastClick();
+ *
+ *
+ * Note that it's a very basic and simple implementation, it blocks ghost click on the same element where it was bound.
+ * If you need something more advanced, use plugin by FT Labs https://github.com/ftlabs/fastclick
+ *
+ */
+
+(function() {
+ var ghostClickDelay = 1000,
+ supportsTouch = 'ontouchstart' in window,
+ unbindTouchMove = function() {
+ _window.off('touchmove'+ns+' touchend'+ns);
+ },
+ eName = 'mfpFastClick',
+ ns = '.'+eName;
+
+
+ // As Zepto.js doesn't have an easy way to add custom events (like jQuery), so we implement it in this way
+ $.fn.mfpFastClick = function(callback) {
+
+ return $(this).each(function() {
+
+ var elem = $(this),
+ lock;
+
+ if( supportsTouch ) {
+
+ var timeout,
+ startX,
+ startY,
+ pointerMoved,
+ point,
+ numPointers;
+
+ elem.on('touchstart' + ns, function(e) {
+ pointerMoved = false;
+ numPointers = 1;
+
+ point = e.originalEvent ? e.originalEvent.touches[0] : e.touches[0];
+ startX = point.clientX;
+ startY = point.clientY;
+
+ _window.on('touchmove'+ns, function(e) {
+ point = e.originalEvent ? e.originalEvent.touches : e.touches;
+ numPointers = point.length;
+ point = point[0];
+ if (Math.abs(point.clientX - startX) > 10 ||
+ Math.abs(point.clientY - startY) > 10) {
+ pointerMoved = true;
+ unbindTouchMove();
+ }
+ }).on('touchend'+ns, function(e) {
+ unbindTouchMove();
+ if(pointerMoved || numPointers > 1) {
+ return;
+ }
+ lock = true;
+ e.preventDefault();
+ clearTimeout(timeout);
+ timeout = setTimeout(function() {
+ lock = false;
+ }, ghostClickDelay);
+ callback();
+ });
+ });
+
+ }
+
+ elem.on('click' + ns, function() {
+ if(!lock) {
+ callback();
+ }
+ });
+ });
+ };
+
+ $.fn.destroyMfpFastClick = function() {
+ $(this).off('touchstart' + ns + ' click' + ns);
+ if(supportsTouch) _window.off('touchmove'+ns+' touchend'+ns);
+ };
+})();
+
+/*>>fastclick*/
+ _checkInstance(); })(window.jQuery || window.Zepto);
\ No newline at end of file
diff --git a/assets/js/plugins/jquery.magnific-popup/jquery.magnific-popup.min.js b/assets/js/plugins/jquery.magnific-popup/jquery.magnific-popup.min.js
new file mode 100644
index 0000000..cf1f26d
--- /dev/null
+++ b/assets/js/plugins/jquery.magnific-popup/jquery.magnific-popup.min.js
@@ -0,0 +1,4 @@
+/*! Magnific Popup - v0.9.9 - 2013-12-27
+* http://dimsemenov.com/plugins/magnific-popup/
+* Copyright (c) 2013 Dmitry Semenov; */
+(function(e){var t,n,i,o,r,a,s,l="Close",c="BeforeClose",d="AfterClose",u="BeforeAppend",p="MarkupParse",f="Open",m="Change",g="mfp",h="."+g,v="mfp-ready",C="mfp-removing",y="mfp-prevent-close",w=function(){},b=!!window.jQuery,I=e(window),x=function(e,n){t.ev.on(g+e+h,n)},k=function(t,n,i,o){var r=document.createElement("div");return r.className="mfp-"+t,i&&(r.innerHTML=i),o?n&&n.appendChild(r):(r=e(r),n&&r.appendTo(n)),r},T=function(n,i){t.ev.triggerHandler(g+n,i),t.st.callbacks&&(n=n.charAt(0).toLowerCase()+n.slice(1),t.st.callbacks[n]&&t.st.callbacks[n].apply(t,e.isArray(i)?i:[i]))},E=function(n){return n===s&&t.currTemplate.closeBtn||(t.currTemplate.closeBtn=e(t.st.closeMarkup.replace("%title%",t.st.tClose)),s=n),t.currTemplate.closeBtn},_=function(){e.magnificPopup.instance||(t=new w,t.init(),e.magnificPopup.instance=t)},S=function(){var e=document.createElement("p").style,t=["ms","O","Moz","Webkit"];if(void 0!==e.transition)return!0;for(;t.length;)if(t.pop()+"Transition"in e)return!0;return!1};w.prototype={constructor:w,init:function(){var n=navigator.appVersion;t.isIE7=-1!==n.indexOf("MSIE 7."),t.isIE8=-1!==n.indexOf("MSIE 8."),t.isLowIE=t.isIE7||t.isIE8,t.isAndroid=/android/gi.test(n),t.isIOS=/iphone|ipad|ipod/gi.test(n),t.supportsTransition=S(),t.probablyMobile=t.isAndroid||t.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),o=e(document),t.popupsCache={}},open:function(n){i||(i=e(document.body));var r;if(n.isObj===!1){t.items=n.items.toArray(),t.index=0;var s,l=n.items;for(r=0;l.length>r;r++)if(s=l[r],s.parsed&&(s=s.el[0]),s===n.el[0]){t.index=r;break}}else t.items=e.isArray(n.items)?n.items:[n.items],t.index=n.index||0;if(t.isOpen)return t.updateItemHTML(),void 0;t.types=[],a="",t.ev=n.mainEl&&n.mainEl.length?n.mainEl.eq(0):o,n.key?(t.popupsCache[n.key]||(t.popupsCache[n.key]={}),t.currTemplate=t.popupsCache[n.key]):t.currTemplate={},t.st=e.extend(!0,{},e.magnificPopup.defaults,n),t.fixedContentPos="auto"===t.st.fixedContentPos?!t.probablyMobile:t.st.fixedContentPos,t.st.modal&&(t.st.closeOnContentClick=!1,t.st.closeOnBgClick=!1,t.st.showCloseBtn=!1,t.st.enableEscapeKey=!1),t.bgOverlay||(t.bgOverlay=k("bg").on("click"+h,function(){t.close()}),t.wrap=k("wrap").attr("tabindex",-1).on("click"+h,function(e){t._checkIfClose(e.target)&&t.close()}),t.container=k("container",t.wrap)),t.contentContainer=k("content"),t.st.preloader&&(t.preloader=k("preloader",t.container,t.st.tLoading));var c=e.magnificPopup.modules;for(r=0;c.length>r;r++){var d=c[r];d=d.charAt(0).toUpperCase()+d.slice(1),t["init"+d].call(t)}T("BeforeOpen"),t.st.showCloseBtn&&(t.st.closeBtnInside?(x(p,function(e,t,n,i){n.close_replaceWith=E(i.type)}),a+=" mfp-close-btn-in"):t.wrap.append(E())),t.st.alignTop&&(a+=" mfp-align-top"),t.fixedContentPos?t.wrap.css({overflow:t.st.overflowY,overflowX:"hidden",overflowY:t.st.overflowY}):t.wrap.css({top:I.scrollTop(),position:"absolute"}),(t.st.fixedBgPos===!1||"auto"===t.st.fixedBgPos&&!t.fixedContentPos)&&t.bgOverlay.css({height:o.height(),position:"absolute"}),t.st.enableEscapeKey&&o.on("keyup"+h,function(e){27===e.keyCode&&t.close()}),I.on("resize"+h,function(){t.updateSize()}),t.st.closeOnContentClick||(a+=" mfp-auto-cursor"),a&&t.wrap.addClass(a);var u=t.wH=I.height(),m={};if(t.fixedContentPos&&t._hasScrollBar(u)){var g=t._getScrollbarSize();g&&(m.marginRight=g)}t.fixedContentPos&&(t.isIE7?e("body, html").css("overflow","hidden"):m.overflow="hidden");var C=t.st.mainClass;return t.isIE7&&(C+=" mfp-ie7"),C&&t._addClassToMFP(C),t.updateItemHTML(),T("BuildControls"),e("html").css(m),t.bgOverlay.add(t.wrap).prependTo(t.st.prependTo||i),t._lastFocusedEl=document.activeElement,setTimeout(function(){t.content?(t._addClassToMFP(v),t._setFocus()):t.bgOverlay.addClass(v),o.on("focusin"+h,t._onFocusIn)},16),t.isOpen=!0,t.updateSize(u),T(f),n},close:function(){t.isOpen&&(T(c),t.isOpen=!1,t.st.removalDelay&&!t.isLowIE&&t.supportsTransition?(t._addClassToMFP(C),setTimeout(function(){t._close()},t.st.removalDelay)):t._close())},_close:function(){T(l);var n=C+" "+v+" ";if(t.bgOverlay.detach(),t.wrap.detach(),t.container.empty(),t.st.mainClass&&(n+=t.st.mainClass+" "),t._removeClassFromMFP(n),t.fixedContentPos){var i={marginRight:""};t.isIE7?e("body, html").css("overflow",""):i.overflow="",e("html").css(i)}o.off("keyup"+h+" focusin"+h),t.ev.off(h),t.wrap.attr("class","mfp-wrap").removeAttr("style"),t.bgOverlay.attr("class","mfp-bg"),t.container.attr("class","mfp-container"),!t.st.showCloseBtn||t.st.closeBtnInside&&t.currTemplate[t.currItem.type]!==!0||t.currTemplate.closeBtn&&t.currTemplate.closeBtn.detach(),t._lastFocusedEl&&e(t._lastFocusedEl).focus(),t.currItem=null,t.content=null,t.currTemplate=null,t.prevHeight=0,T(d)},updateSize:function(e){if(t.isIOS){var n=document.documentElement.clientWidth/window.innerWidth,i=window.innerHeight*n;t.wrap.css("height",i),t.wH=i}else t.wH=e||I.height();t.fixedContentPos||t.wrap.css("height",t.wH),T("Resize")},updateItemHTML:function(){var n=t.items[t.index];t.contentContainer.detach(),t.content&&t.content.detach(),n.parsed||(n=t.parseEl(t.index));var i=n.type;if(T("BeforeChange",[t.currItem?t.currItem.type:"",i]),t.currItem=n,!t.currTemplate[i]){var o=t.st[i]?t.st[i].markup:!1;T("FirstMarkupParse",o),t.currTemplate[i]=o?e(o):!0}r&&r!==n.type&&t.container.removeClass("mfp-"+r+"-holder");var a=t["get"+i.charAt(0).toUpperCase()+i.slice(1)](n,t.currTemplate[i]);t.appendContent(a,i),n.preloaded=!0,T(m,n),r=n.type,t.container.prepend(t.contentContainer),T("AfterChange")},appendContent:function(e,n){t.content=e,e?t.st.showCloseBtn&&t.st.closeBtnInside&&t.currTemplate[n]===!0?t.content.find(".mfp-close").length||t.content.append(E()):t.content=e:t.content="",T(u),t.container.addClass("mfp-"+n+"-holder"),t.contentContainer.append(t.content)},parseEl:function(n){var i,o=t.items[n];if(o.tagName?o={el:e(o)}:(i=o.type,o={data:o,src:o.src}),o.el){for(var r=t.types,a=0;r.length>a;a++)if(o.el.hasClass("mfp-"+r[a])){i=r[a];break}o.src=o.el.attr("data-mfp-src"),o.src||(o.src=o.el.attr("href"))}return o.type=i||t.st.type||"inline",o.index=n,o.parsed=!0,t.items[n]=o,T("ElementParse",o),t.items[n]},addGroup:function(e,n){var i=function(i){i.mfpEl=this,t._openClick(i,e,n)};n||(n={});var o="click.magnificPopup";n.mainEl=e,n.items?(n.isObj=!0,e.off(o).on(o,i)):(n.isObj=!1,n.delegate?e.off(o).on(o,n.delegate,i):(n.items=e,e.off(o).on(o,i)))},_openClick:function(n,i,o){var r=void 0!==o.midClick?o.midClick:e.magnificPopup.defaults.midClick;if(r||2!==n.which&&!n.ctrlKey&&!n.metaKey){var a=void 0!==o.disableOn?o.disableOn:e.magnificPopup.defaults.disableOn;if(a)if(e.isFunction(a)){if(!a.call(t))return!0}else if(a>I.width())return!0;n.type&&(n.preventDefault(),t.isOpen&&n.stopPropagation()),o.el=e(n.mfpEl),o.delegate&&(o.items=i.find(o.delegate)),t.open(o)}},updateStatus:function(e,i){if(t.preloader){n!==e&&t.container.removeClass("mfp-s-"+n),i||"loading"!==e||(i=t.st.tLoading);var o={status:e,text:i};T("UpdateStatus",o),e=o.status,i=o.text,t.preloader.html(i),t.preloader.find("a").on("click",function(e){e.stopImmediatePropagation()}),t.container.addClass("mfp-s-"+e),n=e}},_checkIfClose:function(n){if(!e(n).hasClass(y)){var i=t.st.closeOnContentClick,o=t.st.closeOnBgClick;if(i&&o)return!0;if(!t.content||e(n).hasClass("mfp-close")||t.preloader&&n===t.preloader[0])return!0;if(n===t.content[0]||e.contains(t.content[0],n)){if(i)return!0}else if(o&&e.contains(document,n))return!0;return!1}},_addClassToMFP:function(e){t.bgOverlay.addClass(e),t.wrap.addClass(e)},_removeClassFromMFP:function(e){this.bgOverlay.removeClass(e),t.wrap.removeClass(e)},_hasScrollBar:function(e){return(t.isIE7?o.height():document.body.scrollHeight)>(e||I.height())},_setFocus:function(){(t.st.focus?t.content.find(t.st.focus).eq(0):t.wrap).focus()},_onFocusIn:function(n){return n.target===t.wrap[0]||e.contains(t.wrap[0],n.target)?void 0:(t._setFocus(),!1)},_parseMarkup:function(t,n,i){var o;i.data&&(n=e.extend(i.data,n)),T(p,[t,n,i]),e.each(n,function(e,n){if(void 0===n||n===!1)return!0;if(o=e.split("_"),o.length>1){var i=t.find(h+"-"+o[0]);if(i.length>0){var r=o[1];"replaceWith"===r?i[0]!==n[0]&&i.replaceWith(n):"img"===r?i.is("img")?i.attr("src",n):i.replaceWith('
'):i.attr(o[1],n)}}else t.find(h+"-"+e).html(n)})},_getScrollbarSize:function(){if(void 0===t.scrollbarSize){var e=document.createElement("div");e.id="mfp-sbm",e.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(e),t.scrollbarSize=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}return t.scrollbarSize}},e.magnificPopup={instance:null,proto:w.prototype,modules:[],open:function(t,n){return _(),t=t?e.extend(!0,{},t):{},t.isObj=!0,t.index=n||0,this.instance.open(t)},close:function(){return e.magnificPopup.instance&&e.magnificPopup.instance.close()},registerModule:function(t,n){n.options&&(e.magnificPopup.defaults[t]=n.options),e.extend(this.proto,n.proto),this.modules.push(t)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'
× ',tClose:"Close (Esc)",tLoading:"Loading..."}},e.fn.magnificPopup=function(n){_();var i=e(this);if("string"==typeof n)if("open"===n){var o,r=b?i.data("magnificPopup"):i[0].magnificPopup,a=parseInt(arguments[1],10)||0;r.items?o=r.items[a]:(o=i,r.delegate&&(o=o.find(r.delegate)),o=o.eq(a)),t._openClick({mfpEl:o},i,r)}else t.isOpen&&t[n].apply(t,Array.prototype.slice.call(arguments,1));else n=e.extend(!0,{},n),b?i.data("magnificPopup",n):i[0].magnificPopup=n,t.addGroup(i,n);return i};var P,O,z,M="inline",B=function(){z&&(O.after(z.addClass(P)).detach(),z=null)};e.magnificPopup.registerModule(M,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){t.types.push(M),x(l+"."+M,function(){B()})},getInline:function(n,i){if(B(),n.src){var o=t.st.inline,r=e(n.src);if(r.length){var a=r[0].parentNode;a&&a.tagName&&(O||(P=o.hiddenClass,O=k(P),P="mfp-"+P),z=r.after(O).detach().removeClass(P)),t.updateStatus("ready")}else t.updateStatus("error",o.tNotFound),r=e("
");return n.inlineElement=r,r}return t.updateStatus("ready"),t._parseMarkup(i,{},n),i}}});var F,H="ajax",L=function(){F&&i.removeClass(F)},A=function(){L(),t.req&&t.req.abort()};e.magnificPopup.registerModule(H,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'
The content could not be loaded.'},proto:{initAjax:function(){t.types.push(H),F=t.st.ajax.cursor,x(l+"."+H,A),x("BeforeChange."+H,A)},getAjax:function(n){F&&i.addClass(F),t.updateStatus("loading");var o=e.extend({url:n.src,success:function(i,o,r){var a={data:i,xhr:r};T("ParseAjax",a),t.appendContent(e(a.data),H),n.finished=!0,L(),t._setFocus(),setTimeout(function(){t.wrap.addClass(v)},16),t.updateStatus("ready"),T("AjaxContentAdded")},error:function(){L(),n.finished=n.loadError=!0,t.updateStatus("error",t.st.ajax.tError.replace("%url%",n.src))}},t.st.ajax.settings);return t.req=e.ajax(o),""}}});var j,N=function(n){if(n.data&&void 0!==n.data.title)return n.data.title;var i=t.st.image.titleSrc;if(i){if(e.isFunction(i))return i.call(t,n);if(n.el)return n.el.attr(i)||""}return""};e.magnificPopup.registerModule("image",{options:{markup:'
',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'
The image could not be loaded.'},proto:{initImage:function(){var e=t.st.image,n=".image";t.types.push("image"),x(f+n,function(){"image"===t.currItem.type&&e.cursor&&i.addClass(e.cursor)}),x(l+n,function(){e.cursor&&i.removeClass(e.cursor),I.off("resize"+h)}),x("Resize"+n,t.resizeImage),t.isLowIE&&x("AfterChange",t.resizeImage)},resizeImage:function(){var e=t.currItem;if(e&&e.img&&t.st.image.verticalFit){var n=0;t.isLowIE&&(n=parseInt(e.img.css("padding-top"),10)+parseInt(e.img.css("padding-bottom"),10)),e.img.css("max-height",t.wH-n)}},_onImageHasSize:function(e){e.img&&(e.hasSize=!0,j&&clearInterval(j),e.isCheckingImgSize=!1,T("ImageHasSize",e),e.imgHidden&&(t.content&&t.content.removeClass("mfp-loading"),e.imgHidden=!1))},findImageSize:function(e){var n=0,i=e.img[0],o=function(r){j&&clearInterval(j),j=setInterval(function(){return i.naturalWidth>0?(t._onImageHasSize(e),void 0):(n>200&&clearInterval(j),n++,3===n?o(10):40===n?o(50):100===n&&o(500),void 0)},r)};o(1)},getImage:function(n,i){var o=0,r=function(){n&&(n.img[0].complete?(n.img.off(".mfploader"),n===t.currItem&&(t._onImageHasSize(n),t.updateStatus("ready")),n.hasSize=!0,n.loaded=!0,T("ImageLoadComplete")):(o++,200>o?setTimeout(r,100):a()))},a=function(){n&&(n.img.off(".mfploader"),n===t.currItem&&(t._onImageHasSize(n),t.updateStatus("error",s.tError.replace("%url%",n.src))),n.hasSize=!0,n.loaded=!0,n.loadError=!0)},s=t.st.image,l=i.find(".mfp-img");if(l.length){var c=document.createElement("img");c.className="mfp-img",n.img=e(c).on("load.mfploader",r).on("error.mfploader",a),c.src=n.src,l.is("img")&&(n.img=n.img.clone()),c=n.img[0],c.naturalWidth>0?n.hasSize=!0:c.width||(n.hasSize=!1)}return t._parseMarkup(i,{title:N(n),img_replaceWith:n.img},n),t.resizeImage(),n.hasSize?(j&&clearInterval(j),n.loadError?(i.addClass("mfp-loading"),t.updateStatus("error",s.tError.replace("%url%",n.src))):(i.removeClass("mfp-loading"),t.updateStatus("ready")),i):(t.updateStatus("loading"),n.loading=!0,n.hasSize||(n.imgHidden=!0,i.addClass("mfp-loading"),t.findImageSize(n)),i)}}});var W,R=function(){return void 0===W&&(W=void 0!==document.createElement("p").style.MozTransform),W};e.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(e){return e.is("img")?e:e.find("img")}},proto:{initZoom:function(){var e,n=t.st.zoom,i=".zoom";if(n.enabled&&t.supportsTransition){var o,r,a=n.duration,s=function(e){var t=e.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),i="all "+n.duration/1e3+"s "+n.easing,o={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},r="transition";return o["-webkit-"+r]=o["-moz-"+r]=o["-o-"+r]=o[r]=i,t.css(o),t},d=function(){t.content.css("visibility","visible")};x("BuildControls"+i,function(){if(t._allowZoom()){if(clearTimeout(o),t.content.css("visibility","hidden"),e=t._getItemToZoom(),!e)return d(),void 0;r=s(e),r.css(t._getOffset()),t.wrap.append(r),o=setTimeout(function(){r.css(t._getOffset(!0)),o=setTimeout(function(){d(),setTimeout(function(){r.remove(),e=r=null,T("ZoomAnimationEnded")},16)},a)},16)}}),x(c+i,function(){if(t._allowZoom()){if(clearTimeout(o),t.st.removalDelay=a,!e){if(e=t._getItemToZoom(),!e)return;r=s(e)}r.css(t._getOffset(!0)),t.wrap.append(r),t.content.css("visibility","hidden"),setTimeout(function(){r.css(t._getOffset())},16)}}),x(l+i,function(){t._allowZoom()&&(d(),r&&r.remove(),e=null)})}},_allowZoom:function(){return"image"===t.currItem.type},_getItemToZoom:function(){return t.currItem.hasSize?t.currItem.img:!1},_getOffset:function(n){var i;i=n?t.currItem.img:t.st.zoom.opener(t.currItem.el||t.currItem);var o=i.offset(),r=parseInt(i.css("padding-top"),10),a=parseInt(i.css("padding-bottom"),10);o.top-=e(window).scrollTop()-r;var s={width:i.width(),height:(b?i.innerHeight():i[0].offsetHeight)-a-r};return R()?s["-moz-transform"]=s.transform="translate("+o.left+"px,"+o.top+"px)":(s.left=o.left,s.top=o.top),s}}});var Z="iframe",q="//about:blank",D=function(e){if(t.currTemplate[Z]){var n=t.currTemplate[Z].find("iframe");n.length&&(e||(n[0].src=q),t.isIE8&&n.css("display",e?"block":"none"))}};e.magnificPopup.registerModule(Z,{options:{markup:'
',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){t.types.push(Z),x("BeforeChange",function(e,t,n){t!==n&&(t===Z?D():n===Z&&D(!0))}),x(l+"."+Z,function(){D()})},getIframe:function(n,i){var o=n.src,r=t.st.iframe;e.each(r.patterns,function(){return o.indexOf(this.index)>-1?(this.id&&(o="string"==typeof this.id?o.substr(o.lastIndexOf(this.id)+this.id.length,o.length):this.id.call(this,o)),o=this.src.replace("%id%",o),!1):void 0});var a={};return r.srcAction&&(a[r.srcAction]=o),t._parseMarkup(i,a,n),t.updateStatus("ready"),i}}});var K=function(e){var n=t.items.length;return e>n-1?e-n:0>e?n+e:e},Y=function(e,t,n){return e.replace(/%curr%/gi,t+1).replace(/%total%/gi,n)};e.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'
',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var n=t.st.gallery,i=".mfp-gallery",r=Boolean(e.fn.mfpFastClick);return t.direction=!0,n&&n.enabled?(a+=" mfp-gallery",x(f+i,function(){n.navigateByImgClick&&t.wrap.on("click"+i,".mfp-img",function(){return t.items.length>1?(t.next(),!1):void 0}),o.on("keydown"+i,function(e){37===e.keyCode?t.prev():39===e.keyCode&&t.next()})}),x("UpdateStatus"+i,function(e,n){n.text&&(n.text=Y(n.text,t.currItem.index,t.items.length))}),x(p+i,function(e,i,o,r){var a=t.items.length;o.counter=a>1?Y(n.tCounter,r.index,a):""}),x("BuildControls"+i,function(){if(t.items.length>1&&n.arrows&&!t.arrowLeft){var i=n.arrowMarkup,o=t.arrowLeft=e(i.replace(/%title%/gi,n.tPrev).replace(/%dir%/gi,"left")).addClass(y),a=t.arrowRight=e(i.replace(/%title%/gi,n.tNext).replace(/%dir%/gi,"right")).addClass(y),s=r?"mfpFastClick":"click";o[s](function(){t.prev()}),a[s](function(){t.next()}),t.isIE7&&(k("b",o[0],!1,!0),k("a",o[0],!1,!0),k("b",a[0],!1,!0),k("a",a[0],!1,!0)),t.container.append(o.add(a))}}),x(m+i,function(){t._preloadTimeout&&clearTimeout(t._preloadTimeout),t._preloadTimeout=setTimeout(function(){t.preloadNearbyImages(),t._preloadTimeout=null},16)}),x(l+i,function(){o.off(i),t.wrap.off("click"+i),t.arrowLeft&&r&&t.arrowLeft.add(t.arrowRight).destroyMfpFastClick(),t.arrowRight=t.arrowLeft=null}),void 0):!1},next:function(){t.direction=!0,t.index=K(t.index+1),t.updateItemHTML()},prev:function(){t.direction=!1,t.index=K(t.index-1),t.updateItemHTML()},goTo:function(e){t.direction=e>=t.index,t.index=e,t.updateItemHTML()},preloadNearbyImages:function(){var e,n=t.st.gallery.preload,i=Math.min(n[0],t.items.length),o=Math.min(n[1],t.items.length);for(e=1;(t.direction?o:i)>=e;e++)t._preloadItem(t.index+e);for(e=1;(t.direction?i:o)>=e;e++)t._preloadItem(t.index-e)},_preloadItem:function(n){if(n=K(n),!t.items[n].preloaded){var i=t.items[n];i.parsed||(i=t.parseEl(n)),T("LazyLoad",i),"image"===i.type&&(i.img=e('
').on("load.mfploader",function(){i.hasSize=!0}).on("error.mfploader",function(){i.hasSize=!0,i.loadError=!0,T("LazyLoadError",i)}).attr("src",i.src)),i.preloaded=!0}}}});var U="retina";e.magnificPopup.registerModule(U,{options:{replaceSrc:function(e){return e.src.replace(/\.\w+$/,function(e){return"@2x"+e})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var e=t.st.retina,n=e.ratio;n=isNaN(n)?n():n,n>1&&(x("ImageHasSize."+U,function(e,t){t.img.css({"max-width":t.img[0].naturalWidth/n,width:"100%"})}),x("ElementParse."+U,function(t,i){i.src=e.replaceSrc(i,n)}))}}}}),function(){var t=1e3,n="ontouchstart"in window,i=function(){I.off("touchmove"+r+" touchend"+r)},o="mfpFastClick",r="."+o;e.fn.mfpFastClick=function(o){return e(this).each(function(){var a,s=e(this);if(n){var l,c,d,u,p,f;s.on("touchstart"+r,function(e){u=!1,f=1,p=e.originalEvent?e.originalEvent.touches[0]:e.touches[0],c=p.clientX,d=p.clientY,I.on("touchmove"+r,function(e){p=e.originalEvent?e.originalEvent.touches:e.touches,f=p.length,p=p[0],(Math.abs(p.clientX-c)>10||Math.abs(p.clientY-d)>10)&&(u=!0,i())}).on("touchend"+r,function(e){i(),u||f>1||(a=!0,e.preventDefault(),clearTimeout(l),l=setTimeout(function(){a=!1},t),o())})})}s.on("click"+r,function(){a||o()})})},e.fn.destroyMfpFastClick=function(){e(this).off("touchstart"+r+" click"+r),n&&I.off("touchmove"+r+" touchend"+r)}}(),_()})(window.jQuery||window.Zepto);
\ No newline at end of file
diff --git a/assets/js/plugins/jquery.mixitup.js b/assets/js/plugins/jquery.mixitup.js
new file mode 100644
index 0000000..f02dd07
--- /dev/null
+++ b/assets/js/plugins/jquery.mixitup.js
@@ -0,0 +1,492 @@
+/*
+ * MIXITUP - A CSS3 & JQuery Filter and Sort Plugin
+ * Version: 1.4.0
+ * Author: Patrick Kunka
+ * Copyright 2012-2013 Patrick Kunka, All Rights Reserved
+ * FREE FOR NON-COMMERCIAL USE
+ * http://www.mixitup.io
+ */
+(function(e) {
+ function m(d, b, h, c, a) {
+ function j() {
+ k.unbind();
+ b && v(b, h, c, a);
+ a.startOrder = [];
+ a.newOrder = [];
+ a.origSort = [];
+ a.checkSort = [];
+ u.removeStyle(a.prefix + "filter, filter, " + a.prefix + "transform, transform, opacity, display").css(a.clean).removeAttr("data-checksum");
+ window.atob || u.css({
+ display: "none",
+ opacity: "0"
+ });
+ k.removeStyle(a.prefix + "transition, transition, " + a.prefix + "perspective, perspective, " + a.prefix + "perspective-origin, perspective-origin, " + (a.resizeContainer ? "height" : ""));
+ "list" == a.layoutMode ?
+ (q.css({
+ display: a.targetDisplayList,
+ opacity: "1"
+ }), a.origDisplay = a.targetDisplayList) : (q.css({
+ display: a.targetDisplayGrid,
+ opacity: "1"
+ }), a.origDisplay = a.targetDisplayGrid);
+ a.origLayout = a.layoutMode;
+ setTimeout(function() {
+ u.removeStyle(a.prefix + "transition, transition");
+ a.mixing = !1;
+ if ("function" == typeof a.onMixEnd) {
+ var b = a.onMixEnd.call(this, a);
+ a = b ? b : a
+ }
+ })
+ }
+ clearInterval(a.failsafe);
+ a.mixing = !0;
+ if ("function" == typeof a.onMixStart) {
+ var f = a.onMixStart.call(this, a);
+ a = f ? f : a
+ }
+ for (var g = a.transitionSpeed, f = 0; 2 >
+ f; f++) {
+ var n = 0 == f ? n = a.prefix : "";
+ a.transition[n + "transition"] = "all " + g + "ms linear";
+ a.transition[n + "transform"] = n + "translate3d(0,0,0)";
+ a.perspective[n + "perspective"] = a.perspectiveDistance + "px";
+ a.perspective[n + "perspective-origin"] = a.perspectiveOrigin
+ }
+ var r = a.targetSelector,
+ u = c.find(r);
+ u.each(function() {
+ this.data = {}
+ });
+ var k = u.parent();
+ k.css(a.perspective);
+ a.easingFallback = "ease-in-out";
+ "smooth" == a.easing && (a.easing = "cubic-bezier(0.25, 0.46, 0.45, 0.94)");
+ "snap" == a.easing && (a.easing = "cubic-bezier(0.77, 0, 0.175, 1)");
+ "windback" == a.easing && (a.easing = "cubic-bezier(0.175, 0.885, 0.320, 1.275)", a.easingFallback = "cubic-bezier(0.175, 0.885, 0.320, 1)");
+ "windup" == a.easing && (a.easing = "cubic-bezier(0.6, -0.28, 0.735, 0.045)", a.easingFallback = "cubic-bezier(0.6, 0.28, 0.735, 0.045)");
+ f = "list" == a.layoutMode && null != a.listEffects ? a.listEffects : a.effects;
+ Array.prototype.indexOf && (a.fade = -1 < f.indexOf("fade") ? "0" : "", a.scale = -1 < f.indexOf("scale") ? "scale(.01)" : "", a.rotateZ = -1 < f.indexOf("rotateZ") ? "rotate(180deg)" : "", a.rotateY = -1 <
+ f.indexOf("rotateY") ? "rotateY(90deg)" : "", a.rotateX = -1 < f.indexOf("rotateX") ? "rotateX(90deg)" : "", a.blur = -1 < f.indexOf("blur") ? "blur(8px)" : "", a.grayscale = -1 < f.indexOf("grayscale") ? "grayscale(100%)" : "");
+ d = d.replace(/\s|\//g, ".");
+ var q = e(),
+ s = e();
+ if ("or" == a.filterLogic) {
+ var m = d.split(".");
+ !0 == a.multiFilter && "" == m[0] && m.shift();
+ 1 > m.length ? s = s.add(c.find(r + ":visible")) : u.each(function() {
+ for (var a = 0, b = e(this), c = 0; c < m.length; c++) b.hasClass(m[c]) && (q = q.add(b), a++);
+ 0 == a && (s = s.add(b))
+ })
+ } else q = q.add(k.find(r + "." +
+ d)), s = s.add(k.find(r + ":not(." + d + "):visible"));
+ d = q.length;
+ var t = e(),
+ p = e(),
+ l = e();
+ s.each(function() {
+ var a = e(this);
+ "none" != a.css("display") && (t = t.add(a), l = l.add(a))
+ });
+ if (q.filter(":visible").length == d && !t.length && !b) {
+ if (a.origLayout == a.layoutMode) return j(), !1;
+ if (1 == q.length) return "list" == a.layoutMode ? (c.addClass(a.listClass), c.removeClass(a.gridClass), l.css("display", a.targetDisplayList)) : (c.addClass(a.gridClass), c.removeClass(a.listClass), l.css("display", a.targetDisplayGrid)), j(), !1
+ }
+ a.origHeight = k.height();
+ if (q.length) {
+ c.removeClass(a.failClass);
+ q.each(function() {
+ var a = e(this);
+ "none" == a.css("display") ? p = p.add(a) : l = l.add(a)
+ });
+ if (a.origLayout != a.layoutMode && !1 == a.animateGridList) return "list" == a.layoutMode ? (c.addClass(a.listClass), c.removeClass(a.gridClass), l.css("display", a.targetDisplayList)) : (c.addClass(a.gridClass), c.removeClass(a.listClass), l.css("display", a.targetDisplayGrid)), j(), !1;
+ if (!window.atob) return j(), !1;
+ u.css(a.clean);
+ l.each(function() {
+ this.data.origPos = e(this).offset()
+ });
+ "list" == a.layoutMode ?
+ (c.addClass(a.listClass), c.removeClass(a.gridClass), p.css("display", a.targetDisplayList)) : (c.addClass(a.gridClass), c.removeClass(a.listClass), p.css("display", a.targetDisplayGrid));
+ p.each(function() {
+ this.data.showInterPos = e(this).offset()
+ });
+ t.each(function() {
+ this.data.hideInterPos = e(this).offset()
+ });
+ l.each(function() {
+ this.data.preInterPos = e(this).offset()
+ });
+ "list" == a.layoutMode ? l.css("display", a.targetDisplayList) : l.css("display", a.targetDisplayGrid);
+ b && v(b, h, c, a);
+ if (b && a.origSort.compare(a.checkSort)) return j(), !1;
+ t.hide();
+ p.each(function() {
+ this.data.finalPos = e(this).offset()
+ });
+ l.each(function() {
+ this.data.finalPrePos = e(this).offset()
+ });
+ a.newHeight = k.height();
+ b && v("reset", null, c, a);
+ p.hide();
+ l.css("display", a.origDisplay);
+ "block" == a.origDisplay ? (c.addClass(a.listClass), p.css("display", a.targetDisplayList)) : (c.removeClass(a.listClass), p.css("display", a.targetDisplayGrid));
+ a.resizeContainer && k.css("height", a.origHeight + "px");
+ d = {};
+ for (f = 0; 2 > f; f++) n = 0 == f ? n = a.prefix : "", d[n + "transform"] = a.scale + " " + a.rotateX + " " +
+ a.rotateY + " " + a.rotateZ, d[n + "filter"] = a.blur + " " + a.grayscale;
+ p.css(d);
+ l.each(function() {
+ var b = this.data,
+ c = e(this);
+ c.hasClass("mix_tohide") ? (b.preTX = b.origPos.left - b.hideInterPos.left, b.preTY = b.origPos.top - b.hideInterPos.top) : (b.preTX = b.origPos.left - b.preInterPos.left, b.preTY = b.origPos.top - b.preInterPos.top);
+ for (var d = {}, g = 0; 2 > g; g++) {
+ var f = 0 == g ? f = a.prefix : "";
+ d[f + "transform"] = "translate(" + b.preTX + "px," + b.preTY + "px)"
+ }
+ c.css(d)
+ });
+ "list" == a.layoutMode ? (c.addClass(a.listClass), c.removeClass(a.gridClass)) :
+ (c.addClass(a.gridClass), c.removeClass(a.listClass));
+ setTimeout(function() {
+ if (a.resizeContainer) {
+ for (var b = {}, c = 0; 2 > c; c++) {
+ var d = 0 == c ? d = a.prefix : "";
+ b[d + "transition"] = "all " + g + "ms ease-in-out";
+ b.height = a.newHeight + "px"
+ }
+ k.css(b)
+ }
+ t.css("opacity", a.fade);
+ p.css("opacity", 1);
+ p.each(function() {
+ var b = this.data;
+ b.tX = b.finalPos.left - b.showInterPos.left;
+ b.tY = b.finalPos.top - b.showInterPos.top;
+ for (var c = {}, d = 0; 2 > d; d++) {
+ var f = 0 == d ? f = a.prefix : "";
+ c[f + "transition-property"] = f + "transform, " + f + "filter, opacity";
+ c[f +
+ "transition-timing-function"] = a.easing + ", linear, linear";
+ c[f + "transition-duration"] = g + "ms";
+ c[f + "transition-delay"] = "0";
+ c[f + "transform"] = "translate(" + b.tX + "px," + b.tY + "px)";
+ c[f + "filter"] = "none"
+ }
+ e(this).css("-webkit-transition", "all " + g + "ms " + a.easingFallback).css(c)
+ });
+ l.each(function() {
+ var b = this.data;
+ b.tX = 0 != b.finalPrePos.left ? b.finalPrePos.left - b.preInterPos.left : 0;
+ b.tY = 0 != b.finalPrePos.left ? b.finalPrePos.top - b.preInterPos.top : 0;
+ for (var c = {}, d = 0; 2 > d; d++) {
+ var f = 0 == d ? f = a.prefix : "";
+ c[f + "transition"] =
+ "all " + g + "ms " + a.easing;
+ c[f + "transform"] = "translate(" + b.tX + "px," + b.tY + "px)"
+ }
+ e(this).css("-webkit-transition", "all " + g + "ms " + a.easingFallback).css(c)
+ });
+ b = {};
+ for (c = 0; 2 > c; c++) d = 0 == c ? d = a.prefix : "", b[d + "transition"] = "all " + g + "ms " + a.easing + ", " + d + "filter " + g + "ms linear, opacity " + g + "ms linear", b[d + "transform"] = a.scale + " " + a.rotateX + " " + a.rotateY + " " + a.rotateZ, b[d + "filter"] = a.blur + " " + a.grayscale, b.opacity = a.fade;
+ t.css(b);
+ k.bind("webkitTransitionEnd transitionend otransitionend oTransitionEnd", function(a) {
+ if (-1 <
+ a.originalEvent.propertyName.indexOf("transform") || -1 < a.originalEvent.propertyName.indexOf("opacity")) - 1 < r.indexOf(".") ? e(a.target).hasClass(r.replace(".", "")) && j() : e(a.target).is(r) && j()
+ })
+ }, 10);
+ a.failsafe = setTimeout(function() {
+ a.mixing && j()
+ }, g + 400)
+ } else {
+ a.resizeContainer && k.css("height", a.origHeight + "px");
+ if (!window.atob) return j(), !1;
+ t = s;
+ setTimeout(function() {
+ k.css(a.perspective);
+ if (a.resizeContainer) {
+ for (var b = {}, d = 0; 2 > d; d++) {
+ var e = 0 == d ? e = a.prefix : "";
+ b[e + "transition"] = "height " + g + "ms ease-in-out";
+ b.height = a.minHeight + "px"
+ }
+ k.css(b)
+ }
+ u.css(a.transition);
+ if (s.length) {
+ b = {};
+ for (d = 0; 2 > d; d++) e = 0 == d ? e = a.prefix : "", b[e + "transform"] = a.scale + " " + a.rotateX + " " + a.rotateY + " " + a.rotateZ, b[e + "filter"] = a.blur + " " + a.grayscale, b.opacity = a.fade;
+ t.css(b);
+ k.bind("webkitTransitionEnd transitionend otransitionend oTransitionEnd", function(b) {
+ if (-1 < b.originalEvent.propertyName.indexOf("transform") || -1 < b.originalEvent.propertyName.indexOf("opacity")) c.addClass(a.failClass), j()
+ })
+ } else a.mixing = !1
+ }, 10)
+ }
+ }
+
+ function v(d, b,
+ h, c) {
+ function a(a, b) {
+ return 1 * a.attr(d).toLowerCase() < 1 * b.attr(d).toLowerCase() ? -1 : 1 * a.attr(d).toLowerCase() > 1 * b.attr(d).toLowerCase() ? 1 : 0
+ }
+
+ function j(a) {
+ "asc" == b ? f.prepend(a).prepend(" \
+ ") : f.append(a).append(" \
+ ")
+ }
+ h.find(c.targetSelector).wrapAll('
');
+ var f = h.find(".mix_sorter");
+ c.origSort.length || f.find(c.targetSelector + ":visible").each(function() {
+ e(this).wrap("
");
+ c.origSort.push(e(this).parent().html().replace(/\s+/g, ""));
+ e(this).unwrap()
+ });
+ f.empty();
+ if ("reset" == d) e.each(c.startOrder,
+ function() {
+ f.append(this).append(" \
+ ")
+ });
+ else if ("default" == d) e.each(c.origOrder, function() {
+ j(this)
+ });
+ else if ("random" == d) {
+ if (!c.newOrder.length) {
+ for (var g = c.startOrder.slice(), n = g.length, r = n; r--;) {
+ var m = parseInt(Math.random() * n),
+ k = g[r];
+ g[r] = g[m];
+ g[m] = k
+ }
+ c.newOrder = g
+ }
+ e.each(c.newOrder, function() {
+ f.append(this).append(" \
+ ")
+ })
+ } else "custom" == d ? e.each(b, function() {
+ j(this)
+ }) : ("undefined" === typeof c.origOrder[0].attr(d) && console.log("No such attribute found. Terminating"), c.newOrder.length || (e.each(c.origOrder,
+ function() {
+ c.newOrder.push(e(this))
+ }), c.newOrder.sort(a)), e.each(c.newOrder, function() {
+ j(this)
+ }));
+ c.checkSort = [];
+ f.find(c.targetSelector + ":visible").each(function(a) {
+ var b = e(this);
+ 0 == a && b.attr("data-checksum", "1");
+ b.wrap("
");
+ c.checkSort.push(b.parent().html().replace(/\s+/g, ""));
+ b.unwrap()
+ });
+ h.find(c.targetSelector).unwrap()
+ }
+ var w = {
+ init: function(d) {
+ return this.each(function() {
+ var b = {
+ targetSelector: ".mix",
+ filterSelector: ".filter",
+ sortSelector: ".sort",
+ buttonEvent: "click",
+ effects: ["fade", "scale"],
+ listEffects: null,
+ easing: "smooth",
+ layoutMode: "grid",
+ targetDisplayGrid: "inline-block",
+ targetDisplayList: "block",
+ listClass: "",
+ gridClass: "",
+ transitionSpeed: 600,
+ showOnLoad: "all",
+ multiFilter: !1,
+ filterLogic: "or",
+ resizeContainer: !0,
+ minHeight: 0,
+ failClass: "fail",
+ perspectiveDistance: "3000",
+ perspectiveOrigin: "50% 50%",
+ animateGridList: !0,
+ onMixLoad: null,
+ onMixStart: null,
+ onMixEnd: null,
+ container: null,
+ origOrder: [],
+ startOrder: [],
+ newOrder: [],
+ origSort: [],
+ checkSort: [],
+ filter: "",
+ mixing: !1,
+ origDisplay: "",
+ origLayout: "",
+ origHeight: 0,
+ newHeight: 0,
+ isTouch: !1,
+ resetDelay: 0,
+ failsafe: null,
+ prefix: "",
+ easingFallback: "ease-in-out",
+ transition: {},
+ perspective: {},
+ clean: {},
+ fade: "1",
+ scale: "",
+ rotateX: "",
+ rotateY: "",
+ rotateZ: "",
+ blur: "",
+ grayscale: ""
+ };
+ d && e.extend(b, d);
+ this.config = b;
+ e.support.touch = "ontouchend" in document;
+ e.support.touch && (b.isTouch = !0, b.resetDelay = 350);
+ b.container = e(this);
+ var h = b.container,
+ c;
+ a: {
+ c = h[0];
+ for (var a = ["Webkit", "Moz", "O", "ms"], j = 0; j < a.length; j++)
+ if (a[j] + "Transition" in c.style) {
+ c = a[j];
+ break a
+ }
+ c = "transition" in c.style ? "" : !1
+ }
+ b.prefix =
+ c;
+ b.prefix = b.prefix ? "-" + b.prefix.toLowerCase() + "-" : "";
+ h.find(b.targetSelector).each(function() {
+ b.origOrder.push(e(this))
+ });
+ for (c = 0; 2 > c; c++) a = 0 == c ? a = b.prefix : "", b.transition[a + "transition"] = "all " + b.transitionSpeed + "ms ease-in-out", b.perspective[a + "perspective"] = b.perspectiveDistance + "px", b.perspective[a + "perspective-origin"] = b.perspectiveOrigin;
+ for (c = 0; 2 > c; c++) a = 0 == c ? a = b.prefix : "", b.clean[a + "transition"] = "none";
+ "list" == b.layoutMode ? (h.addClass(b.listClass), b.origDisplay = b.targetDisplayList) : (h.addClass(b.gridClass),
+ b.origDisplay = b.targetDisplayGrid);
+ b.origLayout = b.layoutMode;
+ c = b.showOnLoad.split(" ");
+ e.each(c, function() {
+ e(b.filterSelector + '[data-filter="' + this + '"]').addClass("active")
+ });
+ h.find(b.targetSelector).addClass("mix_all");
+ "all" == c[0] && (c[0] = "mix_all", b.showOnLoad = "mix_all");
+ var f = e();
+ e.each(c, function() {
+ f = f.add(e("." + this))
+ });
+ f.each(function() {
+ var a = e(this);
+ "list" == b.layoutMode ? a.css("display", b.targetDisplayList) : a.css("display", b.targetDisplayGrid);
+ a.css(b.transition)
+ });
+ setTimeout(function() {
+ b.mixing = !0;
+ f.css("opacity", "1");
+ setTimeout(function() {
+ "list" == b.layoutMode ? f.removeStyle(b.prefix + "transition, transition").css({
+ display: b.targetDisplayList,
+ opacity: 1
+ }) : f.removeStyle(b.prefix + "transition, transition").css({
+ display: b.targetDisplayGrid,
+ opacity: 1
+ });
+ b.mixing = !1;
+ if ("function" == typeof b.onMixLoad) {
+ var a = b.onMixLoad.call(this, b);
+ b = a ? a : b
+ }
+ }, b.transitionSpeed)
+ }, 10);
+ b.filter = b.showOnLoad;
+ e(b.sortSelector).bind(b.buttonEvent, function() {
+ if (!b.mixing) {
+ var a = e(this),
+ c = a.attr("data-sort"),
+ d = a.attr("data-order");
+ if (a.hasClass("active")) {
+ if ("random" != c) return !1
+ } else e(b.sortSelector).removeClass("active"), a.addClass("active");
+ h.find(b.targetSelector).each(function() {
+ b.startOrder.push(e(this))
+ });
+ m(b.filter, c, d, h, b)
+ }
+ });
+ e(b.filterSelector).bind(b.buttonEvent, function() {
+ if (!b.mixing) {
+ var a = e(this);
+ if (!1 == b.multiFilter) e(b.filterSelector).removeClass("active"), a.addClass("active"), b.filter = a.attr("data-filter"), e(b.filterSelector + '[data-filter="' + b.filter + '"]').addClass("active"), "all" == b.filter && (b.filter = "mix_all");
+ else {
+ var c = a.attr("data-filter");
+ "all" == c && (c = "mix_all");
+ a.hasClass("active") ? (a.removeClass("active"), b.filter = b.filter.replace(RegExp("(\\s|^)" + c), "")) : (a.addClass("active"), b.filter = b.filter + " " + c)
+ }
+ m(b.filter, null, null, h, b)
+ }
+ })
+ })
+ },
+ toGrid: function() {
+ return this.each(function() {
+ var d = this.config;
+ "grid" != d.layoutMode && (d.layoutMode = "grid", m(d.filter, null, null, e(this), d))
+ })
+ },
+ toList: function() {
+ return this.each(function() {
+ var d = this.config;
+ "list" != d.layoutMode && (d.layoutMode = "list", m(d.filter, null, null,
+ e(this), d))
+ })
+ },
+ filter: function(d) {
+ return this.each(function() {
+ var b = this.config;
+ e(b.filterSelector).removeClass("active");
+ e(b.filterSelector + '[data-filter="' + d + '"]').addClass("active");
+ "all" == d && (d = "mix_all");
+ b.mixing || (b.filter = d, m(d, null, null, e(this), b))
+ })
+ },
+ sort: function(d) {
+ return this.each(function() {
+ var b = this.config;
+ if (e.isArray(d)) var h = d[0],
+ c = d[1];
+ else h = d, c = "desc";
+ b.mixing || (e(this).find(b.targetSelector).each(function() {
+ b.startOrder.push(e(this))
+ }), m(b.filter, h, c, e(this), b))
+ })
+ }
+ };
+ e.fn.mixitup =
+ function(d, b) {
+ if (w[d]) return w[d].apply(this, Array.prototype.slice.call(arguments, 1));
+ if ("object" === typeof d || !d) return w.init.apply(this, arguments)
+ };
+ e.fn.removeStyle = function(d) {
+ return this.each(function() {
+ var b = e(this);
+ d = d.replace(/\s+/g, "");
+ var h = d.split(",");
+ e.each(h, function() {
+ var c = RegExp(this.toString() + "[^;]+;?", "g");
+ b.attr("style", function(a, b) {
+ if (b) return b.replace(c, "")
+ })
+ })
+ })
+ };
+ Array.prototype.compare = function(d) {
+ if (this.length != d.length) return !1;
+ for (var b = 0; b < d.length; b++)
+ if (this[b].compare &&
+ !this[b].compare(d[b]) || this[b] !== d[b]) return !1;
+ return !0
+ }
+})(jQuery);
diff --git a/assets/js/plugins/owl-carousel/owl.carousel.js b/assets/js/plugins/owl-carousel/owl.carousel.js
new file mode 100644
index 0000000..41427a3
--- /dev/null
+++ b/assets/js/plugins/owl-carousel/owl.carousel.js
@@ -0,0 +1,1512 @@
+/*
+ * jQuery OwlCarousel v1.3.3
+ *
+ * Copyright (c) 2013 Bartosz Wojciechowski
+ * http://www.owlgraphic.com/owlcarousel/
+ *
+ * Licensed under MIT
+ *
+ */
+
+/*JS Lint helpers: */
+/*global dragMove: false, dragEnd: false, $, jQuery, alert, window, document */
+/*jslint nomen: true, continue:true */
+
+if (typeof Object.create !== "function") {
+ Object.create = function (obj) {
+ function F() {}
+ F.prototype = obj;
+ return new F();
+ };
+}
+(function ($, window, document) {
+
+ var Carousel = {
+ init : function (options, el) {
+ var base = this;
+
+ base.$elem = $(el);
+ base.options = $.extend({}, $.fn.owlCarousel.options, base.$elem.data(), options);
+
+ base.userOptions = options;
+ base.loadContent();
+ },
+
+ loadContent : function () {
+ var base = this, url;
+
+ function getData(data) {
+ var i, content = "";
+ if (typeof base.options.jsonSuccess === "function") {
+ base.options.jsonSuccess.apply(this, [data]);
+ } else {
+ for (i in data.owl) {
+ if (data.owl.hasOwnProperty(i)) {
+ content += data.owl[i].item;
+ }
+ }
+ base.$elem.html(content);
+ }
+ base.logIn();
+ }
+
+ if (typeof base.options.beforeInit === "function") {
+ base.options.beforeInit.apply(this, [base.$elem]);
+ }
+
+ if (typeof base.options.jsonPath === "string") {
+ url = base.options.jsonPath;
+ $.getJSON(url, getData);
+ } else {
+ base.logIn();
+ }
+ },
+
+ logIn : function () {
+ var base = this;
+
+ base.$elem.data("owl-originalStyles", base.$elem.attr("style"));
+ base.$elem.data("owl-originalClasses", base.$elem.attr("class"));
+
+ base.$elem.css({opacity: 0});
+ base.orignalItems = base.options.items;
+ base.checkBrowser();
+ base.wrapperWidth = 0;
+ base.checkVisible = null;
+ base.setVars();
+ },
+
+ setVars : function () {
+ var base = this;
+ if (base.$elem.children().length === 0) {return false; }
+ base.baseClass();
+ base.eventTypes();
+ base.$userItems = base.$elem.children();
+ base.itemsAmount = base.$userItems.length;
+ base.wrapItems();
+ base.$owlItems = base.$elem.find(".owl-item");
+ base.$owlWrapper = base.$elem.find(".owl-wrapper");
+ base.playDirection = "next";
+ base.prevItem = 0;
+ base.prevArr = [0];
+ base.currentItem = 0;
+ base.customEvents();
+ base.onStartup();
+ },
+
+ onStartup : function () {
+ var base = this;
+ base.updateItems();
+ base.calculateAll();
+ base.buildControls();
+ base.updateControls();
+ base.response();
+ base.moveEvents();
+ base.stopOnHover();
+ base.owlStatus();
+
+ if (base.options.transitionStyle !== false) {
+ base.transitionTypes(base.options.transitionStyle);
+ }
+ if (base.options.autoPlay === true) {
+ base.options.autoPlay = 5000;
+ }
+ base.play();
+
+ base.$elem.find(".owl-wrapper").css("display", "block");
+
+ if (!base.$elem.is(":visible")) {
+ base.watchVisibility();
+ } else {
+ base.$elem.css("opacity", 1);
+ }
+ base.onstartup = false;
+ base.eachMoveUpdate();
+ if (typeof base.options.afterInit === "function") {
+ base.options.afterInit.apply(this, [base.$elem]);
+ }
+ },
+
+ eachMoveUpdate : function () {
+ var base = this;
+
+ if (base.options.lazyLoad === true) {
+ base.lazyLoad();
+ }
+ if (base.options.autoHeight === true) {
+ base.autoHeight();
+ }
+ base.onVisibleItems();
+
+ if (typeof base.options.afterAction === "function") {
+ base.options.afterAction.apply(this, [base.$elem]);
+ }
+ },
+
+ updateVars : function () {
+ var base = this;
+ if (typeof base.options.beforeUpdate === "function") {
+ base.options.beforeUpdate.apply(this, [base.$elem]);
+ }
+ base.watchVisibility();
+ base.updateItems();
+ base.calculateAll();
+ base.updatePosition();
+ base.updateControls();
+ base.eachMoveUpdate();
+ if (typeof base.options.afterUpdate === "function") {
+ base.options.afterUpdate.apply(this, [base.$elem]);
+ }
+ },
+
+ reload : function () {
+ var base = this;
+ window.setTimeout(function () {
+ base.updateVars();
+ }, 0);
+ },
+
+ watchVisibility : function () {
+ var base = this;
+
+ if (base.$elem.is(":visible") === false) {
+ base.$elem.css({opacity: 0});
+ window.clearInterval(base.autoPlayInterval);
+ window.clearInterval(base.checkVisible);
+ } else {
+ return false;
+ }
+ base.checkVisible = window.setInterval(function () {
+ if (base.$elem.is(":visible")) {
+ base.reload();
+ base.$elem.animate({opacity: 1}, 200);
+ window.clearInterval(base.checkVisible);
+ }
+ }, 500);
+ },
+
+ wrapItems : function () {
+ var base = this;
+ base.$userItems.wrapAll("
").wrap("
");
+ base.$elem.find(".owl-wrapper").wrap("
");
+ base.wrapperOuter = base.$elem.find(".owl-wrapper-outer");
+ base.$elem.css("display", "block");
+ },
+
+ baseClass : function () {
+ var base = this,
+ hasBaseClass = base.$elem.hasClass(base.options.baseClass),
+ hasThemeClass = base.$elem.hasClass(base.options.theme);
+
+ if (!hasBaseClass) {
+ base.$elem.addClass(base.options.baseClass);
+ }
+
+ if (!hasThemeClass) {
+ base.$elem.addClass(base.options.theme);
+ }
+ },
+
+ updateItems : function () {
+ var base = this, width, i;
+
+ if (base.options.responsive === false) {
+ return false;
+ }
+ if (base.options.singleItem === true) {
+ base.options.items = base.orignalItems = 1;
+ base.options.itemsCustom = false;
+ base.options.itemsDesktop = false;
+ base.options.itemsDesktopSmall = false;
+ base.options.itemsTablet = false;
+ base.options.itemsTabletSmall = false;
+ base.options.itemsMobile = false;
+ return false;
+ }
+
+ width = $(base.options.responsiveBaseWidth).width();
+
+ if (width > (base.options.itemsDesktop[0] || base.orignalItems)) {
+ base.options.items = base.orignalItems;
+ }
+ if (base.options.itemsCustom !== false) {
+ //Reorder array by screen size
+ base.options.itemsCustom.sort(function (a, b) {return a[0] - b[0]; });
+
+ for (i = 0; i < base.options.itemsCustom.length; i += 1) {
+ if (base.options.itemsCustom[i][0] <= width) {
+ base.options.items = base.options.itemsCustom[i][1];
+ }
+ }
+
+ } else {
+
+ if (width <= base.options.itemsDesktop[0] && base.options.itemsDesktop !== false) {
+ base.options.items = base.options.itemsDesktop[1];
+ }
+
+ if (width <= base.options.itemsDesktopSmall[0] && base.options.itemsDesktopSmall !== false) {
+ base.options.items = base.options.itemsDesktopSmall[1];
+ }
+
+ if (width <= base.options.itemsTablet[0] && base.options.itemsTablet !== false) {
+ base.options.items = base.options.itemsTablet[1];
+ }
+
+ if (width <= base.options.itemsTabletSmall[0] && base.options.itemsTabletSmall !== false) {
+ base.options.items = base.options.itemsTabletSmall[1];
+ }
+
+ if (width <= base.options.itemsMobile[0] && base.options.itemsMobile !== false) {
+ base.options.items = base.options.itemsMobile[1];
+ }
+ }
+
+ //if number of items is less than declared
+ if (base.options.items > base.itemsAmount && base.options.itemsScaleUp === true) {
+ base.options.items = base.itemsAmount;
+ }
+ },
+
+ response : function () {
+ var base = this,
+ smallDelay,
+ lastWindowWidth;
+
+ if (base.options.responsive !== true) {
+ return false;
+ }
+ lastWindowWidth = $(window).width();
+
+ base.resizer = function () {
+ if ($(window).width() !== lastWindowWidth) {
+ if (base.options.autoPlay !== false) {
+ window.clearInterval(base.autoPlayInterval);
+ }
+ window.clearTimeout(smallDelay);
+ smallDelay = window.setTimeout(function () {
+ lastWindowWidth = $(window).width();
+ base.updateVars();
+ }, base.options.responsiveRefreshRate);
+ }
+ };
+ $(window).resize(base.resizer);
+ },
+
+ updatePosition : function () {
+ var base = this;
+ base.jumpTo(base.currentItem);
+ if (base.options.autoPlay !== false) {
+ base.checkAp();
+ }
+ },
+
+ appendItemsSizes : function () {
+ var base = this,
+ roundPages = 0,
+ lastItem = base.itemsAmount - base.options.items;
+
+ base.$owlItems.each(function (index) {
+ var $this = $(this);
+ $this
+ .css({"width": base.itemWidth})
+ .data("owl-item", Number(index));
+
+ if (index % base.options.items === 0 || index === lastItem) {
+ if (!(index > lastItem)) {
+ roundPages += 1;
+ }
+ }
+ $this.data("owl-roundPages", roundPages);
+ });
+ },
+
+ appendWrapperSizes : function () {
+ var base = this,
+ width = base.$owlItems.length * base.itemWidth;
+
+ base.$owlWrapper.css({
+ "width": width * 2,
+ "left": 0
+ });
+ base.appendItemsSizes();
+ },
+
+ calculateAll : function () {
+ var base = this;
+ base.calculateWidth();
+ base.appendWrapperSizes();
+ base.loops();
+ base.max();
+ },
+
+ calculateWidth : function () {
+ var base = this;
+ base.itemWidth = Math.round(base.$elem.width() / base.options.items);
+ },
+
+ max : function () {
+ var base = this,
+ maximum = ((base.itemsAmount * base.itemWidth) - base.options.items * base.itemWidth) * -1;
+ if (base.options.items > base.itemsAmount) {
+ base.maximumItem = 0;
+ maximum = 0;
+ base.maximumPixels = 0;
+ } else {
+ base.maximumItem = base.itemsAmount - base.options.items;
+ base.maximumPixels = maximum;
+ }
+ return maximum;
+ },
+
+ min : function () {
+ return 0;
+ },
+
+ loops : function () {
+ var base = this,
+ prev = 0,
+ elWidth = 0,
+ i,
+ item,
+ roundPageNum;
+
+ base.positionsInArray = [0];
+ base.pagesInArray = [];
+
+ for (i = 0; i < base.itemsAmount; i += 1) {
+ elWidth += base.itemWidth;
+ base.positionsInArray.push(-elWidth);
+
+ if (base.options.scrollPerPage === true) {
+ item = $(base.$owlItems[i]);
+ roundPageNum = item.data("owl-roundPages");
+ if (roundPageNum !== prev) {
+ base.pagesInArray[prev] = base.positionsInArray[i];
+ prev = roundPageNum;
+ }
+ }
+ }
+ },
+
+ buildControls : function () {
+ var base = this;
+ if (base.options.navigation === true || base.options.pagination === true) {
+ base.owlControls = $("
").toggleClass("clickable", !base.browser.isTouch).appendTo(base.$elem);
+ }
+ if (base.options.pagination === true) {
+ base.buildPagination();
+ }
+ if (base.options.navigation === true) {
+ base.buildButtons();
+ }
+ },
+
+ buildButtons : function () {
+ var base = this,
+ buttonsWrapper = $("