1/* Created by Artisteer v4.1.0.60046 */ 2/*jshint forin:true, noarg:true, noempty:true, eqeqeq:true, bitwise:true, strict:true, undef:true, curly:false, browser:true, jquery:false */ 3/*global jQuery */ 4 5var responsiveDesign = { 6 isResponsive: false, 7 isDesktop: false, 8 isTablet: false, 9 isPhone: false, 10 windowWidth: 0, 11 responsive: (function ($) { 12 "use strict"; 13 return function () { 14 var html = $("html"); 15 this.windowWidth = $(window).width(); 16 var triggerEvent = false; 17 18 var isRespVisible = $("#art-resp").is(":visible"); 19 if (isRespVisible && !this.isResponsive) { 20 html.addClass("responsive").removeClass("desktop"); 21 this.isResponsive = true; 22 this.isDesktop = false; 23 triggerEvent = true; 24 } else if (!isRespVisible && !this.isDesktop) { 25 html.addClass("desktop").removeClass("responsive responsive-tablet responsive-phone"); 26 this.isResponsive = this.isTablet = this.isPhone = false; 27 this.isDesktop = true; 28 triggerEvent = true; 29 } 30 31 if (this.isResponsive) { 32 if ($("#art-resp-t").is(":visible") && !this.isTablet) { 33 html.addClass("responsive-tablet").removeClass("responsive-phone"); 34 this.isTablet = true; 35 this.isPhone = false; 36 triggerEvent = true; 37 } else if ($("#art-resp-m").is(":visible") && !this.isPhone) { 38 html.addClass("responsive-phone").removeClass("responsive-tablet"); 39 this.isTablet = false; 40 this.isPhone = true; 41 triggerEvent = true; 42 } 43 } 44 45 if (triggerEvent) { 46 $(window).trigger("responsive", this); 47 } 48 49 $(window).trigger("responsiveResize", this); 50 }; 51 })(jQuery), 52 initialize: (function ($) { 53 "use strict"; 54 return function () { 55 $("<div id=\"art-resp\"><div id=\"art-resp-m\"></div><div id=\"art-resp-t\"></div></div>").appendTo("body"); 56 var resizeTimeout; 57 $(window).resize(function () { 58 clearTimeout(resizeTimeout); 59 resizeTimeout = setTimeout(function () { responsiveDesign.responsive(); }, 25); 60 }); 61 $(window).trigger("resize"); 62 }; 63 })(jQuery) 64}; 65 66function responsiveAbsBg(responsiveDesign, el, bg) { 67 "use strict"; 68 if (bg.length === 0) 69 return; 70 71 var desktopBgTop = bg.attr("data-bg-top"); 72 var desktopBgHeight = bg.attr("data-bg-height"); 73 74 if (responsiveDesign.isResponsive) { 75 if (typeof desktopBgTop === "undefined" || desktopBgTop === false) { 76 bg.attr("data-bg-top", bg.css("top")); 77 bg.attr("data-bg-height", bg.css("height")); 78 } 79 80 var elTop = el.offset().top; 81 var elHeight = el.outerHeight(); 82 bg.css("top", elTop + "px"); 83 bg.css("height", elHeight + "px"); 84 } else if (typeof desktopBgTop !== "undefined" && desktopBgTop !== false) { 85 bg.css("top", desktopBgTop); 86 bg.css("height", desktopBgHeight); 87 bg.removeAttr("data-bg-top"); 88 bg.removeAttr("data-bg-height"); 89 } 90} 91 92var responsiveImages = (function ($) { 93 "use strict"; 94 return function (responsiveDesign) { 95 $("img[width]").each(function () { 96 var img = $(this), newWidth = "", newMaxWidth = "", newHeight = ""; 97 if (responsiveDesign.isResponsive) { 98 newWidth = "auto"; 99 newHeight = "auto"; 100 newMaxWidth = "100%"; 101 102 var widthAttr = img.attr("width"); 103 if (widthAttr !== null && typeof (widthAttr) === "string" && widthAttr.indexOf("%") === -1) { 104 newWidth = "100%"; 105 newMaxWidth = parseInt($.trim(widthAttr), 10) + "px"; 106 } 107 } 108 img.css("width", newWidth).css("max-width", newMaxWidth).css("height", newHeight); 109 }); 110 }; 111})(jQuery); 112 113var responsiveVideos = (function ($) { 114 "use strict"; 115 return function (responsiveDesign) { 116 $("iframe,object,embed").each(function () { 117 var obj = $(this); 118 var container = obj.parent(".art-responsive-embed"); 119 if (responsiveDesign.isResponsive) { 120 if (container.length !== 0) 121 return; 122 container = $("<div class=\"art-responsive-embed\">").insertBefore(obj); 123 obj.appendTo(container); 124 } else if (container.length > 0) { 125 obj.insertBefore(container); 126 container.remove(); 127 } 128 }); 129 }; 130})(jQuery); 131 132var responsiveTextblocks = (function ($) { 133 "use strict"; 134 return function (slider, responsiveDesign) { 135 slider.find(".art-textblock").each(function () { 136 if (parseInt(slider.attr("data-width"), 10) === 0) { 137 return true; 138 } 139 var tb = $(this); 140 var c = slider.width() / slider.attr("data-width"); 141 tb.css({ 142 "height": "", 143 "width": "", 144 "top": "", 145 "margin-left": "" 146 }); 147 if (responsiveDesign.isResponsive) { 148 var tbHeight = parseInt(tb.css("height"), 10); 149 var tbWidth = parseInt(tb.css("width"), 10); 150 var tbTop = parseInt(tb.css("top"), 10); 151 var tbMargin = parseInt(tb.css("margin-left"), 10); 152 tb.add(tb.children()).css({ 153 "height": tbHeight * c, 154 "width": tbWidth * c 155 }); 156 tb.css("top", tbTop * c); 157 tb.attr("style", function (i, s) { return s + "margin-left: " + (tbMargin * c) + "px !important"; }); 158 } 159 }); 160 }; 161})(jQuery); 162 163var responsiveSlider = (function ($) { 164 "use strict"; 165 return function (responsiveDesign) { 166 $(".art-slider").each(function () { 167 var s = $(this); 168 169 responsiveTextblocks(s, responsiveDesign); 170 171 if (!responsiveDesign.isResponsive) { 172 s.removeAttr("style"); 173 return; 174 } 175 176 // set size 177 var initialWidth = s.attr("data-width"); 178 var initialHeight = s.attr("data-height"); 179 var c = s.width() / initialWidth; 180 var h = c * initialHeight; 181 s.css("height", h + "px"); 182 183 // set slider 184 var obj = s.data("slider"); 185 if (obj && obj.settings.helper) { 186 var inner = s.find(".art-slider-inner"); 187 obj.settings.helper.updateSize(inner, { width: initialWidth, height: initialHeight }); 188 } 189 }); 190 }; 191})(jQuery); 192 193var responsiveCollages = (function ($) { 194 "use strict"; 195 return function (responsiveDesign) { 196 $(".art-collage").each(function () { 197 var collage = $(this); 198 var parent = collage.closest(":not(.image-caption-wrapper, .art-collage)"); 199 var parentWidth = parent.width(); 200 var collageWidth = collage.width(); 201 var sliderOriginalWidth = collage.children(".art-slider").attr("data-width"); 202 if (responsiveDesign.isResponsive && collageWidth > parentWidth) { 203 collage 204 .add(collage.find(".art-slider")) 205 .add(collage.closest(".image-caption-wrapper")) 206 .css("width", "100%"); 207 } else if (!responsiveDesign.isResponsive || collageWidth > sliderOriginalWidth) { 208 collage 209 .add(collage.find(".art-slider")) 210 .add(collage.closest(".image-caption-wrapper")) 211 .css("width", ""); 212 } 213 }); 214 }; 215})(jQuery); 216 217var responsiveNavigator = (function ($) { 218 "use strict"; 219 return function (responsiveDesign) { 220 $(".art-slider").each(function () { 221 var currentSlider = $(this); 222 var currentSliderWidth = currentSlider.width(); 223 var sliderNavigator = currentSlider.siblings(".art-slidenavigator"); 224 if (sliderNavigator.length) { 225 if (responsiveDesign.isResponsive) { 226 // left offset 227 var left = sliderNavigator.attr("data-left"); 228 var margin = currentSliderWidth - currentSliderWidth * parseFloat(left) / 100 - sliderNavigator.outerWidth(false); 229 if (margin < 0) { 230 sliderNavigator.css("margin-left", margin); 231 } 232 // top 233 var sliderHeight = currentSlider.css("height"); 234 // reset top to original value 235 sliderNavigator.css("top", ""); 236 // newTop = oldTop - (sliderOrinalHeight - sliderCurrentHeight) 237 var offset = parseInt(sliderNavigator.attr("data-offset") || 0, 10); 238 sliderNavigator.css("top", parseInt(sliderNavigator.css("top"), 10) - (currentSlider.attr("data-height") - parseInt(sliderHeight, 10)) + offset); 239 } else { 240 sliderNavigator.removeAttr("data-offset"); 241 sliderNavigator.removeAttr("style"); 242 } 243 } 244 }); 245 }; 246})(jQuery); 247 248jQuery(window).bind("responsive", (function ($) { 249 "use strict"; 250 return function (event, responsiveDesign) { 251 responsiveImages(responsiveDesign); 252 responsiveVideos(responsiveDesign); 253 254 if (browser.ie && browser.version <= 8) return; 255 256 if (responsiveDesign.isResponsive) { 257 $(window).on("responsiveResize.slider", function () { 258 responsiveSlideshow(responsiveDesign); 259 }); 260 } else { 261 $(window).trigger("responsiveResize.slider"); 262 $(window).off("responsiveResize.slider"); 263 } 264 }; 265})(jQuery)); 266 267function responsiveSlideshow(responsiveDesign) { 268 "use strict"; 269 responsiveCollages(responsiveDesign); // must be first 270 responsiveSlider(responsiveDesign); 271 responsiveNavigator(responsiveDesign); 272} 273 274 275 276 277 278 279jQuery(window).bind("responsiveResize", (function ($) { 280 "use strict"; 281 return function (event, responsiveDesign) { 282 responsiveAbsBg(responsiveDesign, $("nav.art-nav"), $("#art-hmenu-bg")); 283 }; 284})(jQuery)); 285 286 287 288 289jQuery(function ($) { 290 "use strict"; 291 $(".art-hmenu a") 292 .click(function(e) { 293 var link = $(this); 294 if ($(".responsive").length === 0) 295 return; 296 297 var item = link.parent("li"); 298 299 if (item.hasClass("active")) { 300 item.removeClass("active").children("a").removeClass("active"); 301 } else { 302 item.addClass("active").children("a").addClass("active"); 303 } 304 305 if (item.children("ul").length > 0) { 306 e.preventDefault(); 307 } 308 }) 309 .each(function() { 310 var link = $(this); 311 if (link.get(0).href === location.href) { 312 link.addClass("active").parents("li").addClass("active"); 313 return false;
314 } 315 }); 316}); 317 318 319jQuery(function($) { 320 $("<a href=\"#\" class=\"art-menu-btn\"><span></span><span></span><span></span></a>").insertBefore(".art-hmenu").click(function(e) { 321 var menu = $(this).next(); 322 if (menu.is(":visible")) { 323 menu.slideUp("fast", function() { 324 $(this).removeClass("visible").css("display", ""); 325 }); 326 } else { 327 menu.slideDown("fast", function() { 328 $(this).addClass("visible").css("display", ""); 329 }); 330 } 331 e.preventDefault(); 332 }); 333}); 334 335var responsiveHeader = (function ($) { 336 "use strict"; 337 return function(responsiveDesign) { 338 var header = $("header.art-header"); 339 var headerSlider = header.find(".art-slider"); 340 341 if (headerSlider.length) { 342 var firstSlide = headerSlider.find(".art-slide-item").first(); 343 var slidebg = firstSlide.css("background-image").split(","); 344 var previousSibling = headerSlider.prev(); 345 var sliderNav = headerSlider.siblings(".art-slidenavigator"); 346 if (slidebg.length && responsiveDesign.isResponsive) { 347 header.css("background-image", slidebg[slidebg.length - 1]); 348 header.css("min-height", "0"); 349 // if prev is menu in header 350 if (previousSibling.is("nav.art-nav")) { 351 sliderNav.attr("data-offset", previousSibling.height()); 352 } 353 } else { 354 sliderNav.removeAttr("data-offset"); 355 header.removeAttr("style"); 356 } 357 } 358 }; 359})(jQuery); 360 361jQuery(window).bind("responsiveResize", (function ($) { 362 "use strict"; 363 return function (event, responsiveDesign) { 364 responsiveAbsBg(responsiveDesign, $(".art-header"), $("#art-header-bg")); 365 }; 366})(jQuery)); 367 368jQuery(window).bind("responsive", (function ($) { 369 "use strict"; 370 return function (event, responsiveDesign) { 371 if (browser.ie && browser.version <= 8) return; 372 373 if (responsiveDesign.isResponsive) { 374 $(window).on("responsiveResize.header", function () { 375 responsiveHeader(responsiveDesign); 376 }); 377 } else { 378 $(window).trigger("responsiveResize.header"); 379 $(window).trigger("resize"); 380 $(window).off("responsiveResize.header"); 381 } 382 }; 383})(jQuery)); 384 385var responsiveLayoutCell = (function ($) { 386 "use strict"; 387 return function (responsiveDesign) { 388 $(".art-content .art-content-layout-row,.art-footer .art-content-layout-row").each(function () { 389 var row = $(this); 390 var rowChildren = row.children(".art-layout-cell"); 391 if (rowChildren.length > 1) { 392 if (responsiveDesign.isTablet) { 393 rowChildren.addClass("responsive-tablet-layout-cell").each(function (i) { 394 if ((i + 1) % 2 === 0) { 395 $(this).after("<div class=\"cleared responsive-cleared\">"); 396 } 397 }); 398 } else { 399 rowChildren.removeClass("responsive-tablet-layout-cell"); 400 row.children(".responsive-cleared").remove(); 401 } 402 } 403 }); 404 }; 405})(jQuery); 406 407jQuery(window).bind("responsive", function (event, responsiveDesign) { 408 "use strict"; 409 responsiveLayoutCell(responsiveDesign); 410}); 411 412 413var responsiveLayoutCell = (function ($) { 414 "use strict"; 415 return function (responsiveDesign) { 416 $(".art-content .art-content-layout-row,.art-footer .art-content-layout-row").each(function () { 417 var row = $(this); 418 var rowChildren = row.children(".art-layout-cell"); 419 if (rowChildren.length > 1) { 420 if (responsiveDesign.isTablet) { 421 rowChildren.addClass("responsive-tablet-layout-cell").each(function (i) { 422 if ((i + 1) % 2 === 0) { 423 $(this).after("<div class=\"cleared responsive-cleared\">"); 424 } 425 }); 426 } else { 427 rowChildren.removeClass("responsive-tablet-layout-cell"); 428 row.children(".responsive-cleared").remove(); 429 } 430 } 431 }); 432 }; 433})(jQuery); 434 435jQuery(window).bind("responsive", function (event, responsiveDesign) { 436 "use strict"; 437 responsiveLayoutCell(responsiveDesign); 438}); 439 440 441 442 443if (!browser.ie || browser.version > 8) { 444 jQuery(responsiveDesign.initialize); 445}
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.