1// Carousel Box 2(function($, window, document, undefined) { 3 "use strict"; 4 5 var masterCarouselBox = function(elm, opts) { 6 this.elm = elm; 7 this.$elm = $(elm); 8 this.opts = opts; 9 this.config = this.$elm.data("config"); 10 }; 11 12 masterCarouselBox.prototype = { 13 defaults: { 14 contain: !1, 15 imagesLoaded: !0, 16 arrowShape: "M38.1,47.1L35.2,50l22.6,22.6l2.8-2.8L40.9,50l19.7-19.7l-2.8-2.8L46.5,38.7L38.1,47.1z", 17 // M8,12.1l8.7-8.7c0.3-0.3,0.3-0.8,0-1.1c-0.3-0.3-0.8-0.3-1.1,0l-9.2,9.2c-0.3,0.3-0.3,0.8,0,1.1l9.2,9.2c0.3,0.3,0.8,0.3,1.1,0s0.3-0.8,0-1.1L8,12.1z 18 19 percentPosition: !1, 20 adaptiveHeight: !1, 21 cellAlign: "left", 22 groupCells: !0, 23 dragThreshold: 20, 24 wrapAround: !1, 25 autoPlay: !1, 26 navArrow: 1, 27 filters: !1, 28 equalHeightCells: !1, 29 randomVerOffset: !1, 30 draggable: !0, 31 32 column: 3, 33 gap: "30px", 34 fullRight: !1, 35 prevNextButtons: !1, 36 arrowStyle: "arrow-style-1", 37 arrowPosition: "middle", 38 arrowMiddleOffset: "0px", 39 arrowTopOffset: "40px", 40 pageDots: !1, 41 dotStyle: "dot-style-1", 42 dotOffset: "40px", 43 filter: !1 44 }, 45 init: function() { 46 this.args = $.extend({}, this.defaults, this.opts, this.config); 47 this.build(); 48 this.event(); 49 return this; 50 }, 51 build: function() { 52 var 53 t = this, 54 css = "", 55 cls = "", 56 arr = [], 57 a = t.args.column, 58 b = t.args.gap, 59 c = t.args.fullRight, 60 d = t.args.prevNextButtons, 61 e = t.args.arrowStyle, 62 f = t.args.arrowPosition, 63 g = t.args.arrowMiddleOffset, 64 h = t.args.arrowTopOffset, 65 i = t.args.arrowShape, 66 j = t.args.pageDots, 67 k = t.args.dotStyle, 68 l = t.args.dotOffset, 69 m = t.args.filter, 70 n = t.args.fullRightOpacity, 71 z = t.$elm.attr("class").split(" "); 72 73 $(z).each(function(i, e) { 74 e.indexOf("mlr-") == 0 && (cls = "." + z[0] + "." + e) 75 }) 76 77 if (m) { 78 var id = "filter-" + (new Date).getTime(); 79 t.$elm.alterClass("filter-*", id) 80 t.filter(id) 81 } 82 83 t.$elm.alterClass("column-*", "column-" + a + "-gap-" + b), 84 t.$elm.alterClass("gap-*", "gap-" + b), 85 t.$elm.alterClass("arrow-style-*", "arrow-style-" + a + "-gap-" + b), 86 t.$elm.alterClass("arrow-position-*", "arrow-position-" + f), 87 j && t.$elm.alterClass("bullets-*", "bullets-" + l) 88 89 if ( !t.$elm.find('.flickity-viewport').length ) { 90 t.$elm.children().addClass("item-carousel") 91 } 92 t.$elm.waitForImages(function() { 93 t.$elm.flickity(t.args); 94 }) 95 96 c && (n = n ? "opacity:" + n + ";" : "", 97 css += cls + " .item-carousel {" + n + "}", 98 css += "@media screen and (max-width: 767px) {" + cls + " .item-carousel {" + "opacity:0;" + "}}"), 99 100 css += cls + " .item-carousel.is-selected {" + "opacity:1;" + "}\n", 101 css && $("#master-dynamic").length 102 ? ((arr = $("#master-dynamic").html().split("\n")), 103 $.each(arr, function(i, e) { 104 e && e.indexOf(cls) > -1 && arr.splice(e, 1) 105 }), 106 $("#master-dynamic").empty().append(arr.join("\n")).append(css)) 107 : $("head").append("<style type='text/css' id='master-dynamic'>" + css + "</style>") 108 109 t.$elm.waitForImages(function() { 110 var 111 u = $(t.elm).data("flickity"); 112 if (u) { 113 var 114 v = u.size.width, 115 w = $(u.viewport), 116 x = window.innerWidth - (v + w.offset().left), 117 y = $("<div />").addClass("flickity-aside-wrap"); 118 119 c && w.wrap(y).css("overflow", "visible") 120 .parent().css({"padding-right": x, "margin-right": -x, "overflow": "hidden"}) 121 } 122 123 }) 124 }, 125 filter: function(id) { 126 var 127 t = this, 128 css = "", 129 cls = "#" + id, 130 arr = [], 131 a = t.args.filterAll, 132 b = t.args.filterCat, 133 c = b.split(","), 134 d = t.args.filterAlign, 135 e = t.args.filterMargin, 136 f = t.args.filterMarginMobi, 137 g = t.args.filterMarginSmobi, 138 y = $('<div class="master-spacer" data-config=\'{"desktop": "50px", "mobi": "50px", "smobi": "50px"}\'></div>'), 139 z = $("<div />").attr("id", id).addClass("carousel-filter"); 140 141 t.$elm.before(z) 142 a && $('<div class="filter-item" data-filter="*">All</div>').appendTo(z) 143 for (var i1 = 0; i1 < c.length; i1++) { 144 $('<div class="filter-item" data-filter="' + c[i1].replace(" ", "-").toLowerCase() + '">' + c[i1] + '</div>').appendTo(z) 145 } 146 147 d && z.alterClass("align-*", "align-" + d) 148 e = e ? "margin:" + e + ";" : "", 149 f = f ? "margin:" + f + ";" : "", 150 g = g ? "margin:" + g + ";" : "", 151 152 f ? css += "@media screen and (max-width: 991px) and (min-width: 768px) {" + cls + " {" + f + "}}" : css += "", 153 g ? css += "@media only screen and (max-width: 767px) {" + cls + " {" + g + "}}" : css += "", 154 css += cls + " {" + e + "}\n", 155 156 css && $("#master-dynamic").length 157 ? ((arr = $("#master-dynamic").html().split("\n")), 158 $.each(arr, function(i, e) { 159 e && e.indexOf(cls) > -1 && arr.splice(e, 1) 160 }), 161 $("#master-dynamic").empty().append(arr.join("\n")).append(css)) 162 : $("head").append("<style type='text/css' id='master-dynamic'>" + css + "</style>") 163 }, 164 event: function() { 165 var 166 t = this; 167 168 // Filter 169 $(".carousel-filter .filter-item").on("click", function() { 170 var 171 a = $(this).parent().attr("id"), 172 b = $(this).data("filter"); 173 174 if (b !== "*") { 175 var 176 c = $("." + a + " .item-carousel").not("." + b), 177 d = $("." + a + " .item-carousel." + b); 178 c.hide() 179 d.show() 180 } else { 181 $("." + a + " .item-carousel").show() 182 } 183 184 // Remove other element before destroy 185 $("." + a).find(".ctr-edit").remove(), 186 t.args.fullRight && t.$elm.find(".flickity-viewport").unwrap() 187 188 t.$elm.flickity("destroy"); 189 t.$elm.waitForImages(function() { 190 t.$elm.flickity(t.args); 191 }) 192 193 t.$elm.waitForImages(function() { 194 if (t.args.fullRight) { 195 var 196 u = $(t.elm).data("flickity"), 197 v = u.size.width, 198 w = $(u.viewport), 199 x = window.innerWidth - (v + w.offset().left), 200 y = $("<div />").addClass("flickity-aside-wrap"); 201 202 var z = $("<div />").addClass("flickity-aside-wrap"); 203 t.$elm.find(".flickity-viewport").wrap(y).css("overflow", "visible") 204 .parent().css({"padding-right": x, "margin-right": -x, "overflow": "hidden"}) 205 } 206 }) 207 }) 208 209 // Position 210 var selected = t.$elm.find('.item-carousel.is-selected'); 211 selected.first().addClass('left'); 212 selected.last().addClass('right'); 213 214 // Selected change 215 t.$elm.on( 'select.flickity', function( event, index ) { 216 var selected = t.$elm.find('.item-carousel.is-selected'), 217 item = t.$elm.find('.item-carousel'); 218 219 item.removeClass('left right'); 220 selected.first().addClass('left'); 221 selected.last().addClass('right'); 222 }); 223 224 // Center 225 if ( t.$elm.cellAlign == 'center' ) { 226 var selected = t.$elm.find('.item-carousel.is-selected'), 227 item = t.$elm.find('.item-carousel'); 228 229 // Init 230 if ( selected.length > 1 ) { 231 var column = selected.length, 232 centerIndex = selected.index() + Math.floor(column/2); 233 item.removeClass('center'); 234 item.eq(centerIndex).addClass('center'); 235 } else { 236 item.removeClass('center'); 237 selected.addClass('center'); 238 } 239 240 // Selected change 241 t.$elm.on( 'select.flickity', function( event, index ) { 242 var selected = t.$elm.find('.item-carousel.is-selected'), 243 item = t.$elm.find('.item-carousel'); 244 245 if ( selected.length > 1 ) { 246 var column = selected.length, 247 centerIndex = selected.index() + Math.floor(column/2); 248 item.removeClass('center'); 249 item.eq(centerIndex).addClass('center'); 250 } else { 251 $(item).removeClass('center'); 252 $(selected).addClass('center'); 253 } 254 }); 255 } 256 } 257 }; 258 259 masterCarouselBox.defaults = masterCarouselBox.prototype.defaults; 260 261 $.fn.masterCarouselBox = function(opts) { 262 return this.each(function() { 263 new masterCarouselBox(this, opts).init(); 264 }); 265 }; 266}(jQuery, window, document)); 267 268// Project Grid 269(function( $, window, document, undefined ) { 270 "use strict"; 271 272 var masterPortfolio = function(elm, opts) { 273 this.elm = elm; 274 this.$elm = $(elm); 275 this.opts = opts; 276 this.config = this.$elm.data("config" ); 277 }; 278 279 masterPortfolio.prototype = { 280 defaults: { 281 filters: ".projects-filter", 282 layoutMode: "grid", 283 defaultFilter: "*", 284 gapHorizontal: 30, 285 gapVertical: 30, 286 showNavigation: !0, 287 showPagination: !0, 288 gridAdjustment: "responsive", 289 rewindNav: !1, 290 auto: !1, 291 mediaQueries: [{ 292 width: 1200, 293 cols: 4, 294 }, { 295 width: 992, 296 cols: 3, 297 }, { 298 width: 768, 299 cols: 2, 300 }, { 301 width: 480, 302 cols: 1, 303 }], 304 columns: "5,3,2,1", 305 filterStyle: "filter-style-1", 306 filterColor: "light", 307 filterMargin: "0px 0px 50px 0px", 308 displayType: 'bottomToTop', 309 displayTypeSpeed: 100 310 }, 311 init: function() { 312 this.args = $.extend({}, this.defaults, this.opts, this.config); 313 this.build(); 314 return this; 315 }, 316 build: function() { 317 var 318 t = this, 319 css = "", 320 cls = "", 321 arr = [], 322 a = t.config.columns, 323 b = t.args.mediaQueries, 324 c = t.args.filterStyle, 325 d = t.args.filterColor, 326 e = t.args.filterMargin, 327 z = t.$elm.attr("class").split(" "); 328 329 $(z).each(function(i, e) { 330 e.indexOf("mlr-") == 0 && (cls = "." + z[0] + "." + e) 331 }), 332 333 t.$elm.find(".projects-filter").alterClass("filter-style-*", c), 334 t.$elm.find(".projects-filter").alterClass("filter-color-*", "filter-color" + d), 335 336 b = a == "2,2,1,1" ? [{"width": 1200, "cols": 2},{"width": 830, "cols": 2},{"width": 768, "cols": 1},{"width": 480, "cols": 1}] : b, 337 b = a == "3,3,2,1" ? [{"width": 1200, "cols": 3},{"width": 830, "cols": 2},{"width": 768, "cols": 2},{"width": 480, "cols": 1}] : b, 338 b = a == "4,3,2,1" ? [{"width": 1200, "cols": 4},{"width": 830, "cols": 3},{"width": 768, "cols": 2},{"width": 480, "cols": 1}] : b, 339 b = a == "5,3,2,1" ? [{"width": 1200, "cols": 5},{"width": 830, "cols": 3},{"width": 768, "cols": 2},{"width": 480, "cols": 1}] : b, 340 b = a == "6,4,3,2" ? [{"width": 1200, "cols": 6},{"width": 830, "cols": 4},{"width": 768, "cols": 3},{"width": 480, "cols": 2}] : b, 341 t.args.mediaQueries = b; 342 343 t.$elm.find(".galleries").cubeportfolio(t.args), 344 345 e = e ? "margin:" + e + " !important;" : "", 346 347 css += cls + " .projects-filter {" + e + "}\n", 348 css && $("#master-dynamic").length 349 ? ((arr = $("#master-dynamic").html().split("\n")), 350 $.each(arr, function(i, e) { 351 e && e.indexOf(cls) > -1 && arr.splice(e, 1) 352 }), 353 $("#master-dynamic").empty().append(arr.join("\n")).append(css)) 354 : $("head").append("<style type='text/css' id='master-dynamic'>" + css + "</style>") 355 }, 356 }; 357 358 masterPortfolio.defaults = masterPortfolio.prototype.defaults; 359 360 $.fn.masterPortfolio = function(opts) { 361 return this.each(function() { 362 new masterPortfolio(this, opts).init(); 363 }); 364 }; 365}(jQuery, window, document));
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.