{"version":3,"file":"Slideshow.js","sources":["Slideshow.js"],"sourcesContent":["/*==============================================================================================================================\r\n| Author Ignia, LLC\r\n| Client GoldSim\r\n| Project Website\r\n\\=============================================================================================================================*/\r\n\r\n/**\r\n * SLIDESHOW\r\n * @file Object for initializing the slideshow carousel.\r\n */\r\n;(function(window, document, goldSimWeb, $, undefined) {\r\n\r\n /*============================================================================================================================\r\n | ESTABLISH VARIABLES\r\n \\---------------------------------------------------------------------------------------------------------------------------*/\r\n var pluginName = \"slideshow\";\r\n var defaults = {\r\n };\r\n\r\n /*============================================================================================================================\r\n | CONSTRUCTOR\r\n \\---------------------------------------------------------------------------------------------------------------------------*/\r\n /**\r\n * Constructor for initializing the jQuery plugin.\r\n */\r\n function Plugin(element, options) {\r\n\r\n //Public properties\r\n this.element = element;\r\n this.options = $.extend({}, defaults, options);\r\n\r\n //Private properties\r\n this._defaults = defaults;\r\n this._name = pluginName;\r\n\r\n //Initialize\r\n this.init();\r\n\r\n }\r\n\r\n /*============================================================================================================================\r\n | INITIALIZER\r\n \\---------------------------------------------------------------------------------------------------------------------------*/\r\n /**\r\n * Initialize the plug.\r\n */\r\n Plugin.prototype.init = function () {\r\n\r\n var carousel = $(this.element);\r\n\r\n carousel.owlCarousel({\r\n items : 1,\r\n lazyLoad : true,\r\n URLhashListener : true,\r\n margin : 10,\r\n autoHeight : false,\r\n startPosition : 'URLHash',\r\n nav : true,\r\n navText : [\r\n '',\r\n '',\r\n ],\r\n dots : true,\r\n dotsEach : 1\r\n });\r\n\r\n /**\r\n * Differentiate top and bottom nav\r\n */\r\n $('.owl-nav:not(.bottom)').addClass('top');\r\n\r\n /**\r\n * Recalculate carousel stage height\r\n */\r\n setTimeout(function() {\r\n this.adjustStageHeight('.owl-item.active');\r\n }.bind(this), 1000);\r\n carousel.on('translated.owl.carousel', function (event) {\r\n this.adjustStageHeight('.owl-item.active');\r\n }.bind(this));\r\n\r\n /**\r\n * Reflect navigation disabled state\r\n */\r\n $('.owl-prev.custom').addClass('disabled');\r\n carousel.on('translated.owl.carousel', function (event) {\r\n this.reflectDisabledState('.owl-prev');\r\n this.reflectDisabledState('.owl-next');\r\n }.bind(this));\r\n\r\n /**\r\n * Manually trigger bottom navigation\r\n */\r\n $('.owl-prev.custom').click(function () {\r\n carousel.trigger('prev.owl.carousel');\r\n // Scroll back to top of content\r\n $('html, body').animate({\r\n scrollTop: $('article[itemprop=\"mainContentOfPage\"]').offset().top\r\n }, 'slow');\r\n });\r\n $('.owl-next.custom').click(function () {\r\n carousel.trigger('next.owl.carousel');\r\n // Scroll back to top of content\r\n $('html, body').animate({\r\n scrollTop: $('article[itemprop=\"mainContentOfPage\"]').offset().top\r\n }, 'slow');\r\n });\r\n\r\n /**\r\n * Clear navigation button focus\r\n */\r\n $('.owl-prev, .owl-next').click(function () {\r\n $(this).find('button').blur();\r\n });\r\n\r\n\r\n };\r\n\r\n /*============================================================================================================================\r\n | PUBLIC CONSTRUCTOR\r\n \\---------------------------------------------------------------------------------------------------------------------------*/\r\n /**\r\n * Public interface for constructing a new instance of the plugin. This helps prevent multiple instances of the object from\r\n * being instantiated on the same object.\r\n */\r\n $.fn[pluginName] = function (options) {\r\n return this.each(function () {\r\n if (!$.data(this, \"plugin_\" + pluginName)) {\r\n $.data(\r\n this,\r\n \"plugin_\" + pluginName,\r\n new Plugin(this, options)\r\n );\r\n }\r\n });\r\n };\r\n\r\n /*============================================================================================================================\r\n | METHOD: ADJUST STAGE HEIGHT\r\n \\---------------------------------------------------------------------------------------------------------------------------*/\r\n /**\r\n * Adjusts carousel stage height based on height of active slide\r\n */\r\n Plugin.prototype.adjustStageHeight = function(activeSlide) {\r\n var totalHeight = 0;\r\n $(activeSlide).children().each(function() {\r\n totalHeight += $(this).outerHeight(true);\r\n });\r\n $('div.owl-stage-outer').height(totalHeight);\r\n };\r\n\r\n /*============================================================================================================================\r\n | METHOD: REFLECT DISABLED STATE\r\n \\---------------------------------------------------------------------------------------------------------------------------*/\r\n /**\r\n * Reflects disabled state in bottom navigation\r\n */\r\n Plugin.prototype.reflectDisabledState = function(navButton) {\r\n $('.owl-prev.custom, .owl-next.custom').removeClass('disabled');\r\n if ($('.owl-nav.top ' + navButton).hasClass('disabled')) {\r\n $(navButton + '.custom').addClass('disabled');\r\n }\r\n };\r\n\r\n}(window, document, window.goldSimWeb = window.goldSimWeb || {}, jQuery));"],"names":["$","pluginName","defaults","Plugin","element","options","this","extend","_defaults","_name","init","prototype","carousel","owlCarousel","items","lazyLoad","URLhashListener","margin","autoHeight","startPosition","nav","navText","dots","dotsEach","addClass","setTimeout","adjustStageHeight","bind","on","event","reflectDisabledState","click","trigger","animate","scrollTop","offset","top","find","blur","fn","each","data","activeSlide","totalHeight","children","outerHeight","height","navButton","removeClass","hasClass","window","document","goldSimWeb","jQuery"],"mappings":"AAUC,CAAC,SAAuCA,GAKvC,IAAIC,EAA4B,YAC5BC,EAA4B,GAShC,SAASC,EAAOC,EAASC,GAGvBC,KAAKF,QAAyBA,EAC9BE,KAAKD,QAAyBL,EAAEO,OAAO,GAAIL,EAAUG,CAAO,EAG5DC,KAAKE,UAAyBN,EAC9BI,KAAKG,MAAyBR,EAG9BK,KAAKI,KAAK,CAEZ,CAQAP,EAAOQ,UAAUD,KAAO,WAEtB,IAAIE,EAA0BZ,EAAEM,KAAKF,OAAO,EAE5CQ,EAASC,YAAY,CACnBC,MAA4B,EAC5BC,SAA4B,CAAA,EAC5BC,gBAA4B,CAAA,EAC5BC,OAA4B,GAC5BC,WAA4B,CAAA,EAC5BC,cAA4B,UAC5BC,IAA4B,CAAA,EAC5BC,QAA4B,CAC1B,qDACA,sDAEFC,KAA4B,CAAA,EAC5BC,SAA4B,CAC9B,CAAC,EAKDvB,EAAE,uBAAuB,EAAEwB,SAAS,KAAK,EAKzCC,WAAW,WACTnB,KAAKoB,kBAAkB,kBAAkB,CAC3C,EAAEC,KAAKrB,IAAI,EAAG,GAAI,EAClBM,EAASgB,GAAG,0BAA2B,SAAUC,GAC/CvB,KAAKoB,kB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