' + data.viewing +\r\n data.grid + '
',\r\n touch_label = this.settings.touch_label;\r\n\r\n if (Modernizr.touch) {\r\n wrapper = $(wrapper).find('.clearing-touch-label').html(touch_label).end();\r\n }\r\n\r\n holder.after(wrapper).remove();\r\n },\r\n\r\n open : function ($image, current, target) {\r\n var self = this,\r\n body = $(document.body),\r\n root = target.closest('.clearing-assembled'),\r\n container = self.S('div', root).first(),\r\n visible_image = self.S('.visible-img', container),\r\n image = self.S('img', visible_image).not($image),\r\n label = self.S('.clearing-touch-label', container),\r\n error = false;\r\n\r\n // Event to disable scrolling on touch devices when Clearing is activated\r\n $('body').on('touchmove',function(e){\r\n e.preventDefault();\r\n });\r\n\r\n image.error(function () {\r\n error = true;\r\n });\r\n\r\n function startLoad() {\r\n setTimeout(function () {\r\n this.image_loaded(image, function () {\r\n if (image.outerWidth() === 1 && !error) {\r\n startLoad.call(this);\r\n } else {\r\n cb.call(this, image);\r\n }\r\n }.bind(this));\r\n }.bind(this), 100);\r\n }\r\n\r\n function cb (image) {\r\n var $image = $(image);\r\n $image.css('visibility', 'visible');\r\n // toggle the gallery\r\n body.css('overflow', 'hidden');\r\n root.addClass('clearing-blackout');\r\n container.addClass('clearing-container');\r\n visible_image.show();\r\n this.fix_height(target)\r\n .caption(self.S('.clearing-caption', visible_image), self.S('img', target))\r\n .center_and_label(image, label)\r\n .shift(current, target, function () {\r\n target.closest('li').siblings().removeClass('visible');\r\n target.closest('li').addClass('visible');\r\n });\r\n visible_image.trigger('opened.fndtn.clearing')\r\n }\r\n\r\n if (!this.locked()) {\r\n visible_image.trigger('open.fndtn.clearing');\r\n // set the image to the selected thumbnail\r\n image\r\n .attr('src', this.load($image))\r\n .css('visibility', 'hidden');\r\n\r\n startLoad.call(this);\r\n }\r\n },\r\n\r\n close : function (e, el) {\r\n e.preventDefault();\r\n\r\n var root = (function (target) {\r\n if (/blackout/.test(target.selector)) {\r\n return target;\r\n } else {\r\n return target.closest('.clearing-blackout');\r\n }\r\n }($(el))),\r\n body = $(document.body), container, visible_image;\r\n\r\n if (el === e.target && root) {\r\n body.css('overflow', '');\r\n container = $('div', root).first();\r\n visible_image = $('.visible-img', container);\r\n visible_image.trigger('close.fndtn.clearing');\r\n this.settings.prev_index = 0;\r\n $('ul[' + this.attr_name() + ']', root)\r\n .attr('style', '').closest('.clearing-blackout')\r\n .removeClass('clearing-blackout');\r\n container.removeClass('clearing-container');\r\n visible_image.hide();\r\n visible_image.trigger('closed.fndtn.clearing'); \r\n }\r\n\r\n // Event to re-enable scrolling on touch devices\r\n $('body').off('touchmove');\r\n\r\n return false;\r\n },\r\n\r\n is_open : function (current) {\r\n return current.parent().prop('style').length > 0;\r\n },\r\n\r\n keydown : function (e) {\r\n var clearing = $('.clearing-blackout ul[' + this.attr_name() + ']'),\r\n NEXT_KEY = this.rtl ? 37 : 39,\r\n PREV_KEY = this.rtl ? 39 : 37,\r\n ESC_KEY = 27;\r\n\r\n if (e.which === NEXT_KEY) this.go(clearing, 'next');\r\n if (e.which === PREV_KEY) this.go(clearing, 'prev');\r\n if (e.which === ESC_KEY) this.S('a.clearing-close').trigger('click').trigger('click.fndtn.clearing');\r\n },\r\n\r\n nav : function (e, direction) {\r\n var clearing = $('ul[' + this.attr_name() + ']', '.clearing-blackout');\r\n\r\n e.preventDefault();\r\n this.go(clearing, direction);\r\n },\r\n\r\n resize : function () {\r\n var image = $('img', '.clearing-blackout .visible-img'),\r\n label = $('.clearing-touch-label', '.clearing-blackout');\r\n\r\n if (image.length) {\r\n this.center_and_label(image, label);\r\n image.trigger('resized.fndtn.clearing')\r\n }\r\n },\r\n\r\n // visual adjustments\r\n fix_height : function (target) {\r\n var lis = target.parent().children(),\r\n self = this;\r\n\r\n lis.each(function () {\r\n var li = self.S(this),\r\n image = li.find('img');\r\n\r\n if (li.height() > image.outerHeight()) {\r\n li.addClass('fix-height');\r\n }\r\n })\r\n .closest('ul')\r\n .width(lis.length * 100 + '%');\r\n\r\n return this;\r\n },\r\n\r\n update_paddles : function (target) {\r\n target = target.closest('li');\r\n var visible_image = target\r\n .closest('.carousel')\r\n .siblings('.visible-img');\r\n\r\n if (target.next().length > 0) {\r\n this.S('.clearing-main-next', visible_image).removeClass('disabled');\r\n } else {\r\n this.S('.clearing-main-next', visible_image).addClass('disabled');\r\n }\r\n\r\n if (target.prev().length > 0) {\r\n this.S('.clearing-main-prev', visible_image).removeClass('disabled');\r\n } else {\r\n this.S('.clearing-main-prev', visible_image).addClass('disabled');\r\n }\r\n },\r\n\r\n center_and_label : function (target, label) {\r\n if (!this.rtl) {\r\n target.css({\r\n marginLeft : -(target.outerWidth() / 2),\r\n marginTop : -(target.outerHeight() / 2)\r\n });\r\n\r\n if (label.length > 0) {\r\n label.css({\r\n marginLeft : -(label.outerWidth() / 2),\r\n marginTop : -(target.outerHeight() / 2)-label.outerHeight()-10\r\n });\r\n }\r\n } else {\r\n target.css({\r\n marginRight : -(target.outerWidth() / 2),\r\n marginTop : -(target.outerHeight() / 2),\r\n left: 'auto',\r\n right: '50%'\r\n });\r\n\r\n if (label.length > 0) {\r\n label.css({\r\n marginRight : -(label.outerWidth() / 2),\r\n marginTop : -(target.outerHeight() / 2)-label.outerHeight()-10,\r\n left: 'auto',\r\n right: '50%'\r\n });\r\n }\r\n }\r\n return this;\r\n },\r\n\r\n // image loading and preloading\r\n\r\n load : function ($image) {\r\n var href;\r\n\r\n if ($image[0].nodeName === \"A\") {\r\n href = $image.attr('href');\r\n } else {\r\n href = $image.parent().attr('href');\r\n }\r\n\r\n this.preload($image);\r\n\r\n if (href) return href;\r\n return $image.attr('src');\r\n },\r\n\r\n preload : function ($image) {\r\n this\r\n .img($image.closest('li').next())\r\n .img($image.closest('li').prev());\r\n },\r\n\r\n img : function (img) {\r\n if (img.length) {\r\n var new_img = new Image(),\r\n new_a = this.S('a', img);\r\n\r\n if (new_a.length) {\r\n new_img.src = new_a.attr('href');\r\n } else {\r\n new_img.src = this.S('img', img).attr('src');\r\n }\r\n }\r\n return this;\r\n },\r\n\r\n // image caption\r\n\r\n caption : function (container, $image) {\r\n var caption = $image.attr('data-caption');\r\n\r\n if (caption) {\r\n container\r\n .html(caption)\r\n .show();\r\n } else {\r\n container\r\n .text('')\r\n .hide();\r\n }\r\n return this;\r\n }, \r\n\r\n // directional methods\r\n\r\n go : function ($ul, direction) {\r\n var current = this.S('.visible', $ul),\r\n target = current[direction]();\r\n\r\n // Check for skip selector.\r\n if (this.settings.skip_selector && target.find(this.settings.skip_selector).length != 0) {\r\n target = target[direction]();\r\n }\r\n\r\n if (target.length) {\r\n this.S('img', target)\r\n .trigger('click', [current, target]).trigger('click.fndtn.clearing', [current, target])\r\n .trigger('change.fndtn.clearing');\r\n }\r\n },\r\n\r\n shift : function (current, target, callback) {\r\n var clearing = target.parent(),\r\n old_index = this.settings.prev_index || target.index(),\r\n direction = this.direction(clearing, current, target),\r\n dir = this.rtl ? 'right' : 'left',\r\n left = parseInt(clearing.css('left'), 10),\r\n width = target.outerWidth(),\r\n skip_shift;\r\n\r\n var dir_obj = {};\r\n\r\n // we use jQuery animate instead of CSS transitions because we\r\n // need a callback to unlock the next animation\r\n // needs support for RTL **\r\n if (target.index() !== old_index && !/skip/.test(direction)){\r\n if (/left/.test(direction)) {\r\n this.lock();\r\n dir_obj[dir] = left + width;\r\n clearing.animate(dir_obj, 300, this.unlock());\r\n } else if (/right/.test(direction)) {\r\n this.lock();\r\n dir_obj[dir] = left - width;\r\n clearing.animate(dir_obj, 300, this.unlock());\r\n }\r\n } else if (/skip/.test(direction)) {\r\n // the target image is not adjacent to the current image, so\r\n // do we scroll right or not\r\n skip_shift = target.index() - this.settings.up_count;\r\n this.lock();\r\n\r\n if (skip_shift > 0) {\r\n dir_obj[dir] = -(skip_shift * width);\r\n clearing.animate(dir_obj, 300, this.unlock());\r\n } else {\r\n dir_obj[dir] = 0;\r\n clearing.animate(dir_obj, 300, this.unlock());\r\n }\r\n }\r\n\r\n callback();\r\n },\r\n\r\n direction : function ($el, current, target) {\r\n var lis = this.S('li', $el),\r\n li_width = lis.outerWidth() + (lis.outerWidth() / 4),\r\n up_count = Math.floor(this.S('.clearing-container').outerWidth() / li_width) - 1,\r\n target_index = lis.index(target),\r\n response;\r\n\r\n this.settings.up_count = up_count;\r\n\r\n if (this.adjacent(this.settings.prev_index, target_index)) {\r\n if ((target_index > up_count) && target_index > this.settings.prev_index) {\r\n response = 'right';\r\n } else if ((target_index > up_count - 1) && target_index <= this.settings.prev_index) {\r\n response = 'left';\r\n } else {\r\n response = false;\r\n }\r\n } else {\r\n response = 'skip';\r\n }\r\n\r\n this.settings.prev_index = target_index;\r\n\r\n return response;\r\n },\r\n\r\n adjacent : function (current_index, target_index) {\r\n for (var i = target_index + 1; i >= target_index - 1; i--) {\r\n if (i === current_index) return true;\r\n }\r\n return false;\r\n },\r\n\r\n // lock management\r\n\r\n lock : function () {\r\n this.settings.locked = true;\r\n },\r\n\r\n unlock : function () {\r\n this.settings.locked = false;\r\n },\r\n\r\n locked : function () {\r\n return this.settings.locked;\r\n },\r\n\r\n off : function () {\r\n this.S(this.scope).off('.fndtn.clearing');\r\n this.S(window).off('.fndtn.clearing');\r\n },\r\n\r\n reflow : function () {\r\n this.init();\r\n }\r\n };\r\n\r\n}(jQuery, window, window.document));\r\n/*!\r\n * jQuery Cookie Plugin v1.4.1\r\n * https://github.com/carhartl/jquery-cookie\r\n *\r\n * Copyright 2013 Klaus Hartl\r\n * Released under the MIT license\r\n */\r\n!function(a){ true?!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(\"/opt/app/client/src/vendor/jquery@2.1.1.js\")], __WEBPACK_AMD_DEFINE_FACTORY__ = (a),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)):a(\"object\"==typeof exports?require(\"jquery\"):jQuery)}(function(a){function b(a){return h.raw?a:encodeURIComponent(a)}function c(a){return h.raw?a:decodeURIComponent(a)}function d(a){return b(h.json?JSON.stringify(a):String(a))}function e(a){0===a.indexOf('\"')&&(a=a.slice(1,-1).replace(/\\\\\"/g,'\"').replace(/\\\\\\\\/g,\"\\\\\"));try{return a=decodeURIComponent(a.replace(g,\" \")),h.json?JSON.parse(a):a}catch(b){}}function f(b,c){var d=h.raw?b:e(b);return a.isFunction(c)?c(d):d}var g=/\\+/g,h=a.cookie=function(e,g,i){if(void 0!==g&&!a.isFunction(g)){if(i=a.extend({},h.defaults,i),\"number\"==typeof i.expires){var j=i.expires,k=i.expires=new Date;k.setTime(+k+864e5*j)}return document.cookie=[b(e),\"=\",d(g),i.expires?\"; expires=\"+i.expires.toUTCString():\"\",i.path?\"; path=\"+i.path:\"\",i.domain?\"; domain=\"+i.domain:\"\",i.secure?\"; secure\":\"\"].join(\"\")}for(var l=e?void 0:{},m=document.cookie?document.cookie.split(\"; \"):[],n=0,o=m.length;o>n;n++){var p=m[n].split(\"=\"),q=c(p.shift()),r=p.join(\"=\");if(e&&e===q){l=f(r,g);break}e||void 0===(r=f(r))||(l[q]=r)}return l};h.defaults={},a.removeCookie=function(b,c){return void 0===a.cookie(b)?!1:(a.cookie(b,\"\",a.extend({},c,{expires:-1})),!a.cookie(b))}});;(function ($, window, document, undefined) {\r\n 'use strict';\r\n\r\n var Modernizr = Modernizr || false;\r\n\r\n Foundation.libs.joyride = {\r\n name : 'joyride',\r\n\r\n version : '5.4.5',\r\n\r\n defaults : {\r\n expose : false, // turn on or off the expose feature\r\n modal : true, // Whether to cover page with modal during the tour\r\n keyboard : true, // enable left, right and esc keystrokes\r\n tip_location : 'bottom', // 'top' or 'bottom' in relation to parent\r\n nub_position : 'auto', // override on a per tooltip bases\r\n scroll_speed : 1500, // Page scrolling speed in milliseconds, 0 = no scroll animation\r\n scroll_animation : 'linear', // supports 'swing' and 'linear', extend with jQuery UI.\r\n timer : 0, // 0 = no timer , all other numbers = timer in milliseconds\r\n start_timer_on_click : true, // true or false - true requires clicking the first button start the timer\r\n start_offset : 0, // the index of the tooltip you want to start on (index of the li)\r\n next_button : true, // true or false to control whether a next button is used\r\n prev_button : true, // true or false to control whether a prev button is used\r\n tip_animation : 'fade', // 'pop' or 'fade' in each tip\r\n pause_after : [], // array of indexes where to pause the tour after\r\n exposed : [], // array of expose elements\r\n tip_animation_fade_speed : 300, // when tipAnimation = 'fade' this is speed in milliseconds for the transition\r\n cookie_monster : false, // true or false to control whether cookies are used\r\n cookie_name : 'joyride', // Name the cookie you'll use\r\n cookie_domain : false, // Will this cookie be attached to a domain, ie. '.notableapp.com'\r\n cookie_expires : 365, // set when you would like the cookie to expire.\r\n tip_container : 'body', // Where will the tip be attached\r\n abort_on_close : true, // When true, the close event will not fire any callback\r\n tip_location_patterns : {\r\n top: ['bottom'],\r\n bottom: [], // bottom should not need to be repositioned\r\n left: ['right', 'top', 'bottom'],\r\n right: ['left', 'top', 'bottom']\r\n },\r\n post_ride_callback : function (){}, // A method to call once the tour closes (canceled or complete)\r\n post_step_callback : function (){}, // A method to call after each step\r\n pre_step_callback : function (){}, // A method to call before each step\r\n pre_ride_callback : function (){}, // A method to call before the tour starts (passed index, tip, and cloned exposed element)\r\n post_expose_callback : function (){}, // A method to call after an element has been exposed\r\n template : { // HTML segments for tip layout\r\n link : '