1var RADIANT = {}, 2 $ = jQuery.noConflict(); 3(function ($) { 4 "use strict" 5 var $window = $(window), 6 $theme_color = "#2250fc", 7 $body = $("body"), 8 $bodyInner = $(".body-inner"), 9 $section = $("section"), 10 $topbar = $("#topbar"), 11 $header = $("#header"), 12 $headerCurrentClasses = $header.attr("class"), 13 headerLogo = $("#logo"), 14 $mainMenu = $("#rt-mainMenu"), 15 $mainMenuTriggerBtn = $("#rt-mainMenu-trigger a, #rt-mainMenu-trigger button"), 16 $pageMenu = $(".page-menu"), 17 $slider = $("#slider"), 18 $RADIANTSlider = $(".RADIANT-slider"), 19 $carousel = $(".carousel"), 20 $gridLayout = $(".grid-layout"), 21 $gridFilter = $(".grid-filter, .page-grid-filter"), 22 windowWidth = $window.width(); 23 if ($header.length > 0) { 24 var $headerOffsetTop = $header.offset().top 25 } 26 var Events = { 27 browser: { 28 isMobile: function () { 29 if (navigator.userAgent.match(/(iPhone|iPod|iPad|Android|BlackBerry)/)) { 30 return !0 31 } else { 32 return !1 33 } 34 } 35 } 36 } 37 var Settings = { 38 isMobile: Events.browser.isMobile, 39 submenuLight: $header.hasClass("rt-submenu-light") == !0 ? !0 : !1, 40 headerHasDarkClass: $header.hasClass("rt-dark") == !0 ? !0 : !1, 41 headerDarkClassRemoved: !1, 42 sliderDarkClass: !1, 43 menuIsOpen: !1, 44 menuOverlayOpened: !1, 45 } 46 $(window).breakpoints({ 47 breakpoints: [{ 48 name: "xs", 49 width: 0 50 }, { 51 name: "sm", 52 width: 576 53 }, { 54 name: "md", 55 width: 768 56 }, { 57 name: "lg", 58 width: 1025 59 }, { 60 name: "xl", 61 width: 1200 62 }] 63 }) 64 var currentBreakpoint = $(window).breakpoints("getBreakpoint") 65 $body.addClass("breakpoint-" + currentBreakpoint) 66 $(window).bind("breakpoint-change", function (breakpoint) { 67 $body.removeClass("breakpoint-" + breakpoint.from) 68 $body.addClass("breakpoint-" + breakpoint.to) 69 }) 70 $(window).breakpoints("greaterEqualTo", "lg", function () { 71 $body.addClass("b--desktop") 72 $body.removeClass("b--responsive") 73 }) 74 $(window).breakpoints("lessThan", "lg", function () { 75 $body.removeClass("b--desktop") 76 $body.addClass("b--responsive") 77 }) 78 RADIANT.core = { 79 functions: function () { 80 // RADIANT.core.scrollTop() 81 RADIANT.core.rtlStatus() 82 RADIANT.core.equalize() 83 RADIANT.core.customHeight() 84 RADIANT.core.darkTheme() 85 }, 86 rtlStatus: function () { 87 var $rtlStatusCheck = $("html").attr("dir") 88 if ($rtlStatusCheck == "rtl") { 89 return !0 90 } 91 return !1 92 }, 93 equalize: function () { 94 var $equalize = $(".equalize") 95 if ($equalize.length > 0) { 96 $equalize.each(function () { 97 var elem = $(this), 98 selectorItem = elem.find(elem.attr("data-equalize-item")) || "> div", 99 maxHeight = 0 100 selectorItem.each(function () { 101 if ($(this).outerHeight(!0) > maxHeight) { 102 maxHeight = $(this).outerHeight(!0) 103 } 104 }) 105 selectorItem.height(maxHeight) 106 }) 107 } 108 }, 109 customHeight: function (setHeight) { 110 var $customHeight = $(".custom-height") 111 if ($customHeight.length > 0) { 112 $customHeight.each(function () { 113 var elem = $(this), 114 elemHeight = elem.attr("data-height") || 400, 115 elemHeightLg = elem.attr("data-height-lg") || elemHeight, 116 elemHeightMd = elem.attr("data-height-md") || elemHeightLg, 117 elemHeightSm = elem.attr("data-height-sm") || elemHeightMd, 118 elemHeightXs = elem.attr("data-height-xs") || elemHeightSm 119 120 function customHeightBreakpoint(setHeight) { 121 if (setHeight) { 122 elem = setHeight 123 } 124 switch ($(window).breakpoints("getBreakp
124oint")) { 125 case "xs": 126 elem.height(elemHeightXs) 127 break 128 case "sm": 129 elem.height(elemHeightSm) 130 break 131 case "md": 132 elem.height(elemHeightMd) 133 break 134 case "lg": 135 elem.height(elemHeightLg) 136 break 137 case "xl": 138 elem.height(elemHeight) 139 break 140 } 141 } 142 customHeightBreakpoint(setHeight) 143 $(window).resize(function () { 144 setTimeout(function () { 145 customHeightBreakpoint(setHeight) 146 }, 100) 147 }) 148 }) 149 } 150 }, 151 darkTheme: function () { 152 var $darkElement = $("[data-dark-src]"), 153 $lightBtnTrigger = $("#light-mode"), 154 $darkBtnTrigger = $("#rt-dark-mode"), 155 darkColorScheme = "darkColorScheme", 156 defaultDark = $body.hasClass("rt-dark"); 157 if (typeof Cookies.get(darkColorScheme) !== "undefined") { 158 $body.addClass("rt-dark") 159 } 160 $darkBtnTrigger.on("click", function (e) { 161 darkElemSrc(); 162 $body.addClass("rt-dark"); 163 RADIANT.elements.shapeDivider(); 164 Cookies.set(darkColorScheme, !0, { 165 expires: Number(365) 166 }) 167 }) 168 $lightBtnTrigger.on("click", function (e) { 169 lightElemSrc(); 170 $body.removeClass("rt-dark"); 171 RADIANT.elements.shapeDivider(); 172 Cookies.remove(darkColorScheme) 173 }) 174 if ($body.hasClass("rt-dark")) { 175 darkElemSrc() 176 } 177 178 } 179 } 180 RADIANT.header = { 181 functions: function () { 182 RADIANT.header.logoStatus(); 183 RADIANT.header.stickyHeader(); 184 RADIANT.header.topBar(); 185 RADIANT.header.search(); 186 RADIANT.header.mainMenu(); 187 RADIANT.header.mainMenuOverlay(); 188 // RADIANT.header.pageMenu(); 189 // RADIANT.header.sidebarOverlay(); 190 RADIANT.header.dotsMenu(); 191 // RADIANT.header.onepageMenu() 192 }, 193 logoStatus: function (status) { 194 var headerLogoDefault = headerLogo.find($(".logo-default")), 195 headerLogoDark = headerLogo.find($(".logo-rt-dark")), 196 headerLogoFixed = headerLogo.find(".logo-fixed"), 197 headerLogoResponsive = headerLogo.find(".logo-responsive"); 198 if ($header.hasClass("header-sticky") && headerLogoFixed.length > 0) { 199 headerLogoDefault.css("display", "none"); 200 headerLogoDark.css("display", "none"); 201 headerLogoResponsive.css("display", "none"); 202 headerLogoFixed.css("display", "block") 203 } else { 204 headerLogoDefault.removeAttr("style"); 205 headerLogoDark.removeAttr("style"); 206 headerLogoResponsive.removeAttr("style"); 207 headerLogoFixed.removeAttr("style") 208 } 209 $(window).breakpoints("lessThan", "lg", function () { 210 if (headerLogoResponsive.length > 0) { 211 headerLogoDefault.css("display", "none"); 212 headerLogoDark.css("display", "none"); 213 headerLogoFixed.css("display", "none"); 214 headerLogoResponsive.css("display", "block") 215 } 216 }) 217 }, 218 stickyHeader: function () { 219 var elem = $(this), 220 shrinkHeader = elem.attr("data-shrink") || 0, 221 shrinkHeaderActive = elem.attr("data-sticky-active") || 200, 222 scrollOnTop = $window.scrollTop(); 223 if ($header.hasClass("header-modern")) { 224 shrinkHeader = 300 225 } 226 $(window).breakpoints("greaterEqualTo", "lg", function () { 227 if (!$header.is(".header-disable-fixed")) { 228 if (scrollOnTop > $headerOffsetTop + shrinkHeader && ! $body.hasClass("rt-side-menu") ) { 229 $header.addClass("header-sticky"); 230 if (scrollOnTop > $headerOffsetTop + shrinkHeaderActive) { 231 $header.addClass("sticky-active"); 232 if (Settings.submenuLight && Settings.headerHasDarkClass) { 233 $header.removeClass("rt-dark");
234 Settings.headerDarkClassRemoved = !0 235 } 236 RADIANT.header.logoStatus() 237 } 238 } else { 239 $header.removeClass().addClass($headerCurrentClasses); 240 if (Settings.sliderDarkClass && Settings.headerHasDarkClass) { 241 $header.removeClass("rt-dark"); 242 Settings.headerDarkClassRemoved = !0 243 } 244 RADIANT.header.logoStatus() 245 } 246 } 247 }); 248 $(window).breakpoints("lessThan", "lg", function () { 249 if ($header.attr("data-responsive-fixed") == "true") { 250 if (scrollOnTop > $headerOffsetTop + shrinkHeader) { 251 $header.addClass("header-sticky"); 252 if (scrollOnTop > $headerOffsetTop + shrinkHeaderActive) { 253 $header.addClass("sticky-active"); 254 if (Settings.submenuLight) { 255 $header.removeClass("rt-dark"); 256 Settings.headerDarkClassRemoved = !0 257 } 258 RADIANT.header.logoStatus() 259 } 260 } else { 261 $header.removeClass().addClass($headerCurrentClasses); 262 if (Settings.headerDarkClassRemoved == !0 && $body.hasClass("rt-mainMenu-open")) { 263 $header.removeClass("rt-dark") 264 } 265 RADIANT.header.logoStatus() 266 } 267 } 268 }) 269 }, 270 topBar: function () { 271 if ($topbar.length > 0) { 272 $("#topbar .topbar-rt-dropdown .topbar-form").each(function (index, element) { 273 if ($window.width() - ($(element).width() + $(element).offset().left) < 0) { 274 $(element).addClass("rt-dropdown-invert") 275 } 276 }) 277 } 278 }, 279 search: function () { 280 var $search = $("#search"); 281 if ($search.length > 0) { 282 var searchBtn = $("#btn-search"), 283 searchBtnClose = $("#btn-search-close"), 284 searchInput = $search.find(".form-control"); 285 286 function openSearch() { 287 $body.addClass("search-open"); 288 searchInput.focus() 289 } 290 291 function closeSearch() { 292 $body.removeClass("search-open"); 293 searchInput.value = "" 294 } 295 searchBtn.on("click", function () { 296 openSearch(); 297 return !1 298 }) 299 searchBtnClose.on("click", function () { 300 closeSearch(); 301 return !1 302 }) 303 document.addEventListener("keyup", function (ev) { 304 if (ev.keyCode == 27) { 305 closeSearch() 306 } 307 }) 308 } 309 }, 310 mainMenu: function () { 311 if ($mainMenu.length > 0) { 312 $mainMenu.find(".rt-dropdown, .rt-dropdown-submenu").prepend('<span class="rt-dropdown-arrow"></span>'); 313 var $menuItemLinks = $('#rt-mainMenu nav > ul > li.rt-dropdown > a[href="#"], #rt-mainMenu nav > ul > li.rt-dropdown > .rt-dropdown-arrow, .rt-dropdown-submenu > a[href="#"], .rt-dropdown-submenu > .rt-dropdown-arrow, .rt-dropdown-submenu > span, .page-menu nav > ul > li.rt-dropdown > a'), 314 $triggerButton = $("#rt-mainMenu-trigger a, #rt-mainMenu-trigger button"), 315 processing = !1, 316 triggerEvent; 317 $triggerButton.on("click", function (e) { 318 var elem = $(this); 319 e.preventDefault(); 320 $(window).breakpoints("lessThan", "lg", function () { 321 var openMenu = function () { 322 if (!processing) { 323 processing = !0; 324 Settings.menuIsOpen = !0; 325 if (Settings.submenuLight && Settings.headerHasDarkClass) { 326 $header.removeClass("rt-dark");
327 Settings.headerDarkClassRemoved = !0 328 } else { 329 if (Settings.headerHasDarkClass && Settings.headerDarkClassRemoved) { 330 $header.addClass("rt-dark") 331 } 332 } 333 elem.addClass("toggle-active"); 334 $body.addClass("rt-mainMenu-open"); 335 RADIANT.header.logoStatus(); 336 $mainMenu.animate({ 337 "min-height": $window.height() 338 }, { 339 duration: 500, 340 easing: "easeInOutQuart", 341 start: function () { 342 setTimeout(function () { 343 $mainMenu.addClass("menu-animate") 344 }, 300) 345 }, 346 complete: function () { 347 processing = !1 348 } 349 }) 350 } 351 } 352 var closeMenu = function () { 353 if (!processing) { 354 processing = !0; 355 Settings.menuIsOpen = !1; 356 RADIANT.header.logoStatus(); 357 $mainMenu.animate({ 358 "min-height": 0 359 }, { 360 start: function () { 361 $mainMenu.removeClass("menu-animate") 362 }, 363 done: function () { 364 $body.removeClass("rt-mainMenu-open"); 365 elem.removeClass("toggle-active"); 366 if (Settings.submenuLight && Settings.headerHasDarkClass && Settings.headerDarkClassRemoved && !$header.hasClass("header-sticky")) { 367 $header.addClass("rt-dark") 368 } 369 if (Settings.sliderDarkClass && Settings.headerHasDarkClass && Settings.headerDarkClassRemoved) { 370 $header.removeClass("rt-dark"); 371 Settings.headerDarkClassRemoved = !0 372 } 373 }, 374 duration: 500, 375 easing: "easeInOutQuart", 376 complete: function () { 377 processing = !1 378 } 379 }) 380 } 381 } 382 if (!Settings.menuIsOpen) { 383 triggerEvent = openMenu() 384 } else { 385 triggerEvent = closeMenu() 386 } 387 }) 388 }) 389 $menuItemLinks.on("click", function (e) { 390 $(this).parent("li").siblings().removeClass("hover-active"); 391 $(this).parent("li").toggleClass("hover-active"); 392 e.stopPropagation(); 393 e.preventDefault() 394 }); 395 $body.on("click", function (e) { 396 $mainMenu.find(".hover-active").removeClass("hover-active") 397 }); 398 $(window).breakpoints("greaterEqualTo", "lg", function () { 399 var $menuLastItem = $("nav > ul > li:last-child"), 400 $menuLastItemUl = $("nav > ul > li:last-child > ul"), 401 $menuLastInvert = $menuLastItemUl.width() - $menuLastItem.width(), 402 $menuItems = $("nav > ul > li").find(".rt-dropdown-menu"); 403 $menuItems.css("display", "block"); 404 $(".rt-dropdown:not(.mega-menu-item) ul ul").each(function (index, element) { 405 if ($window.width() - ($(element).width() + $(element).offset().left) < 0) { 406 $(element).addClass("menu-invert") 407 } 408 }) 409 if ($window.width() - ($menuLastItemUl.width() + $menuLastItem.offset().left) < 0) { 410 $menuLastItemUl.addClass("menu-last") 411 } 412 $menuItems.css("display", "") 413 }) 414 } 415 }, 416 mainMenuOverlay: function () {}, 417 418 419 dotsMenu: function () { 420 var $dotsMenu = $("#dotsMenu"), 421 $dotsMenuItems = $dotsMenu.find("ul > li > a"); 422 if ($dotsMenu.length > 0) { 423 $dotsMenuItems.on("click", function () { 424 $dotsMenuItems.parent("li").removeClass("current"); 425 $(this).parent("li").addClass("current"); 426 return !1 427 }) 428 $dotsMenuItems.parents("li").removeClass("current");
429 $dotsMenu.find('a[href="#' + RADIANT.header.currentSection() + '"]').parent("li").addClass("current") 430 } 431 }, 432 433 } 434 435 RADIANT.elements = { 436 functions: function () { 437 // RADIANT.elements.shapeDivider(); 438 RADIANT.elements.naTo(); 439 RADIANT.elements.animations(); 440 RADIANT.elements.progressBar(); 441 // RADIANT.elements.gridLayout(); 442 RADIANT.elements.bootstrapSwitch(); 443 RADIANT.elements.other(); 444 }, 445 progressBar: function () { 446 var $progressBar = $(".p-progress-bar") || $(".progress-bar"); 447 if ($progressBar.length > 0) { 448 $progressBar.each(function (i, elem) { 449 var $elem = $(this), 450 percent = $elem.attr("data-percent") || "100", 451 delay = $elem.attr("data-delay") || "60", 452 type = $elem.attr("data-type") || "%"; 453 if (!$elem.hasClass("progress-animated")) { 454 $elem.css({ width: "0%" }); 455 } 456 var progressBarRun = function () { 457 $elem.animate({ width: percent + "%" }, "easeInOutCirc").addClass("progress-animated"); 458 $elem.delay(delay).append('<span class="progress-type">' + type + '</span><span class="progress-number animated fadeIn">' + percent + "</span>"); 459 }; 460 if ($body.hasClass("breakpoint-lg") || $body.hasClass("breakpoint-xl")) { 461 new Waypoint({ 462 element: $(elem), 463 handler: function () { 464 var t = setTimeout(function () { 465 progressBarRun(); 466 }, delay); 467 this.destroy(); 468 }, 469 offset: "100%", 470 }); 471 } else { 472 progressBarRun(); 473 } 474 }); 475 } 476 }, 477 other: function (context) { 478 $(function () { 479 $(".lazy").Lazy({ 480 afterLoad: function (element) { 481 element.addClass("img-loaded") 482 } 483 }) 484 }) 485 if ($(".toggle-item").length > 0) { 486 $(".toggle-item").each(function () { 487 var elem = $(this), 488 toggleItemClass = elem.attr("data-class"), 489 toggleItemClassTarget = elem.attr("data-target") 490 elem.on("click", function () { 491 if (toggleItemClass) { 492 if (toggleItemClassTarget) { 493 $(toggleItemClassTarget).toggleClass(toggleItemClass) 494 } else { 495 elem.toggleClass(toggleItemClass) 496 } 497 } 498 elem.toggleClass("toggle-active"); 499 return !1 500 }) 501 }) 502 } 503 var $pDropdown = $(".p-rt-dropdown"); 504 if ($pDropdown.length > 0) { 505 $pDropdown.each(function () { 506 var elem = $(this); 507 elem.find('> a').on("click", function () { 508 elem.toggleClass("rt-dropdown-active"); 509 return !1 510 }); 511 if ($window.width() / 2 > elem.offset().left) { 512 elem.addClass("p-rt-dropdown-invert") 513 } 514 }) 515 } 516 }, 517 naTo: function () { 518 $("a.scroll-to, #dotsMenu > ul > li > a, .menu-one-page nav > ul > li > a").on("click", function () { 519 var extraPaddingTop = 0, 520 extraHeaderHeight = 0 521 $(window).breakpoints("lessThan", "lg", function () { 522 if (Settings.menuIsOpen) { 523 $mainMenuTriggerBtn.trigger("click") 524 } 525 if ($header.attr("data-responsive-fixed") === !0) { 526 extraHeaderHeight = $header.height() 527 } 528 }) 529 $(window).breakpoints("greaterEqualTo", "lg", function () { 530 if ($header.length > 0) { 531 extraHeaderHeight = $header.height() 532 } 533 }) 534 if ($(".dashboard").length > 0) { 535 extraPaddingTop = 30 536 } 537 var $anchor = $(this) 538 $("html, body").stop(!0, !1).animate({ 539 scrollTop: $($anchor.attr("href")).offset().top - (extraHeaderHeight + extraPaddingTop) 540 }, 1500, "easeInOutExpo") 541 return !1 542 }) 543 }, 544 545 animations: function () { 546 var $animate = $("[data-animate]") 547 if ($animate.length > 0) { 548 if (typeof Waypoint === "undefined") { 549 RADIANT.elements.notification("Warning", "jQuery Waypoint plugin is missing in plugins.js file.", "danger") 550 return !0 551 } 552 $animate.each(function () { 553 var elem = $(this) 554 elem.addClass("animated") 555 elem.options = { 556 animation: elem.attr("data-animate") || "fadeIn", 557 delay: elem.attr("data-animate-delay") || 200, 558 direction: ~elem.attr("data-animate").indexOf("Out") ? "back" : "forward", 559 offsetX: elem.attr("data-animate-offsetX") || 0, 560 offsetY: elem.attr("data-animate-offsetY") || -100 561 } 562 if (elem.options.direction == "forward") { 563 new Waypoint({ 564 element: elem, 565 handler: function () { 566 var t = setTimeout(function () { 567 elem.addClass(elem.options.animation + " visible") 568 }, elem.options.delay) 569 this.destroy() 570 }, 571 offset: "100%" 572 }) 573 } else { 574 elem.addClass("visible") 575 elem.on("click", function () { 576 elem.addClass(elem.options.animation) 577 return !1 578 }) 579 } 580 if (elem.parents(".demo-play-animations").length) { 581 elem.on("click", function () { 582 elem.removeClass(elem.options.animation) 583 var t = setTimeout(function () { 584 elem.addClass(elem.options.animation) 585 }, 50) 586 return !1 587 }) 588 } 589 }) 590 } 591 }, 592 593 bootstrapSwitch: function () { 594 var $bootstrapSwitch = $("[data-switch=true]") 595 if ($bootstrapSwitch.length > 0) { 596 if (typeof $.fn.bootstrapSwitch === "undefined") { 597 RADIANT.elements.notification("Warning", "jQuery bootstrapSwitch plugin is missing in plugins.js file.", "danger") 598 return !0 599 } 600 $bootstrapSwitch.bootstrapSwitch() 601 } 602 }, 603 604 605 } 606 607 $(document).ready(function () { 608 RADIANT.core.functions(); 609 RADIANT.header.functions(); 610 // RADIANT.slider.functions(); 611 // RADIANT.widgets.functions(); 612 RADIANT.elements.functions() 613 }) 614 $window.on("scroll", function () { 615 RADIANT.header.stickyHeader(); 616 // RADIANT.core.scrollTop(); 617 RADIANT.header.dotsMenu() 618 }) 619 $window.on("resize", function () { 620 RADIANT.header.logoStatus(); 621 RADIANT.header.stickyHeader() 622 }) 623})(jQuery)
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.