1(function($, window, document) { 2 3 "use strict"; // a stric mode 4 5 var thememsnry; 6 var blogsmsnry; 7 8 var t_obj = { 9 10 search_popup: function() { 11 12 13 // search pupup form 14 $(document).on("click", ".wrap_search_icon", function(e) { 15 var _this = $(this); 16 e.preventDefault(); 17 18 if (_this.hasClass("tp-search-active")) { 19 _this.removeClass("tp-search-active"); 20 _this.find('i').removeClass("fa-times").addClass("fa-search"); 21 _this.next(".tagpoint-search-content").slideUp(100); 22 return false; 23 } else { 24 _this.addClass("tp-search-active") 25 _this.next(".tagpoint-search-content").slideDown(200); 26 _this.find('i').removeClass("fa-search").addClass("fa-times"); 27 _this.find("input[type='text']").trigger("focus"); 28 return false; 29 } 30 }); 31 32 // close search popup 33 $(document).on("click", "body", function(e) { 34 if ($(".tp-search-active").length) { 35 var search_icon = $(".wrap_search_icon"); 36 37 if ($(e.target).parents(".tagpoint-search-content").length === 1 || $(e.target).hasClass("tagpoint-search-content")) { 38 39 40 41 42 } else { 43 44 $(".tagpoint-search-content").slideUp(100); 45 search_icon.removeClass("tp-search-active"); 46 search_icon.find('i').removeClass("fa-times").addClass("fa-search"); 47 } 48 } 49 50 }); 51 52 }, 53 54 sticky_header: function(lengthHeader) { 55 var header = $('body').find('.tp-main-menu'); 56 if (header.hasClass("sticky-header")) { 57 58 var headerscroll = $(window).scrollTop(); 59 60 if (headerscroll > lengthHeader) { 61 62 header.addClass('tp-fixed-nav'); 63 header.find('.tp-menu').addClass("tp-fixed-menu"); 64 65 } else { 66 67 header.removeClass('tp-fixed-nav'); 68 header.find('.tp-menu').removeClass("tp-fixed-menu"); 69 70 } 71 72 } 73 }, 74 75 projects_masonary: function() { 76 77 var case_grid = $('body').find('.r-projects'); 78 if (case_grid.length) { 79 80 if ($('body').find('.archive-portfolio-filters').length) { 81 //thememsnry = case_grid.masonry({}); 82 83 thememsnry = case_grid.multipleFilterMasonry({ 84 itemSelector: '.col-case', 85 filtersGroupSelector: '.filters', 86 columnWidth: '.grid-sizer', 87 percentPosition: true, 88 }); 89 90 } else { 91 92 thememsnry = case_grid.masonry({ 93 itemSelector: '.col-case', 94 percentPosition: true, 95 columnWidth: '.grid-sizer', 96 97 }); 98 99 100 } 101 102 103 104 105 106 107 if (case_grid.hasClass('ms_infinite_scroll')) { 108 109 110 111 var infinite = new Waypoint.Infinite({ 112 element: case_grid[0], 113 more: '.next.page-numbers', 114 items: 'article.col-case', 115 116 onAfterPageLoad: function($items) { 117 var $_items = $($items); 118 119 case_grid.append($items).masonry('appended', $items); 120 121 case_grid.one('layoutComplete', function() { 122 thememsnry.masonry('layout'); 123 }); 124 125 } 126 }); 127 128 } 129 130 131 132 133 134 } 135 136 137 }, 138 139 blogs_grid: function() { 140 141 var blogs_grid = $('body').find('.wrap_grid_blogs'); 142 if (blogs_grid.length) { 143 144 blogsmsnry = blogs_grid.masonry({ 145 itemSelector: '.col-gblog', 146 percentPosition: true, 147 columnWidth: '.grid-sizer', 148 149 }); 150 151 152 if (blogs_grid.hasClass('blogs-infinite')) { 153 154 var infinite = new Waypoint.Infinite({ 155 element: blogs_grid[0], 156 more: '.next.page-numbers', 157 items: 'article.tp-blog-item', 158 159 onAfterPageLoad: function($items) { 160 var $_items = $($items); 161 162 blogs_grid.append($items).masonry('appended', $items); 163 164 blogs_grid.one('layoutComplete', function() { 165 blogsmsnry.masonry('layout'); 166 }); 167 168 } 169 }); 170 171 } 172 173 } else { 174 175 var classic_blogs = $('body').find('.wrap_classic_blogs'); 176 if (classic_blogs.hasClass('blogs-infinite')) { 177 178 var infinite = new Waypoint.Infinite({ 179 element: classic_blogs[0], 180 more: '.next.page-numbers', 181 items: 'article.tp-blog-item', 182 183 onAfterPageLoad: function($items) { 184 185 186 classic_blogs.append($items); 187 188 189 } 190 }); 191 192 } 193 } 194 195 196 }, 197 198 199 phone_menu: function() { 200 // phone menu ========== 201 $(".tp-main-menu ").on("click", ".phone_menu", function(e) { 202 203 var item = $(this); 204 205 item.toggleClass("ltm_icon_active"); 206 207 if (!item.hasClass("ltm_icon_active")) { 208 209 210 item.closest(".tp-main-menu").find(".tp-menu").removeClass("tp-mainmenu-mobile"); 211 } else { 212 213 item.closest(".tp-main-menu").find(".tp-menu").addClass("tp-mainmenu-mobile"); 214 215 } 216 217 218 }); 219 220 $(document).on("click", "body", function(e) { 221 var $_this = $(this); 222 223 if ($(e.target).parents(".tp-menu").length === 1 || $(e.target).parents(".tagpoint-wrap-logo").length === 1 || $(e.target).parents(".tp-main-menu").length === 1) { 224 225 226 } else { 227 228 229 $_this.find(".tp-menu").removeClass("tp-mainmenu-mobile"); 230 $_this.find(".phone_menu").removeClass("ltm_icon_active"); 231 232 233 } 234 235 }); 236 237 $(".tp-main-menu").on("click", ".tp_phone_dropdown", function(e) { 238 239 240 var _this = $(this); 241 if (_this.hasClass("active")) { 242 _this.removeClass("fa-chevron-up").removeClass("active").addClass("fa-chevron-down"); 243 _this.closest("li.has-sub").find(">ul").slideUp("fast"); 244 245 } else { 246 _this.addClass("active").addClass("fa-chevron-up").removeClass("fa-chevron-down"); 247 _this.closest("li.has-sub").find(">ul").slideDown("fast"); 248 249 } 250 251 }); 252 253 }, 254 255 }; 256 257 jQuery(document).ready(function() { 258 259 (function($) { 260 261 t_obj.search_popup(); 262 t_obj.projects_masonary(); 263 t_obj.blogs_grid(); 264 t_obj.phone_menu(); 265 266 if (jQuery().magnificPopup) { 267 $(document).magnificPopup({ 268 delegate: 'a.blasa-link', 269 type: 'image', 270 gallery: { 271 // options for gallery 272 enabled: true 273 } 274 275 }); 276 } 277 278 if ($('body').find('.mobex-carousel').length) { 279 280 281 $('body').find('.mobex-carousel').each(function(index, el) { 282 var $_slider = $(this).attr('id'); 283 284 var to_show = $("#" + $_slider).data('show'); 285 var space = $("#" + $_slider).data('space'); 286 var slidtype = $("#" + $_slider).data('stype'); 287 var slideloop = $("#" + $_slider).data('loop'); 288 289 var perview, perview_768 = 1, 290 perview_640 = 1, 291 spaceBetween, effect, loop = true; 292 293 perview = (!isNaN(to_show) && to_show !== 'undefined') ? parseInt(to_show, 10) : 1; 294 spaceBetween = (!isNaN(space) && space !== 'undefined') ? parseInt(space, 10) : 0; 295 effect = (slidtype !== 'undefined') ? slidtype : "fade"; 296 if (slideloop === false) { 297 298 loop = false; 299 300 } 301 if (perview > 1) perview_768 = 2; 302 perview_640 = 1; 303 304 var swiper = new Swiper("#" + $_slider + " .swiper-container", { 305 306 pagination: { 307 el: "#" + $_slider + " .swiper-pagination", 308 type: 'bullets', 309 clickable: true, 310 }, 311 autoplay: { delay: 5000 }, 312 speed: 400, 313 paused: true, 314 loop: loop, 315 slidesPerView: perview, 316 spaceBetween: spaceBetween, 317 effect: effect, 318 breakpoints: { 319 "1024": { 320 slidesPerView: perview, 321 }, 322 "768": { 323 slidesPerView: perview_768, 324 }, 325 "640": { 326 slidesPerView: perview_640, 327 328 } 329 } 330 331 }); 332 333 334 }); 335 336 337 } 338 339 340 })(jQuery); 341 });
342 343 if ($('body').find('.tp-menu').length) { 344 345 var lengthHeader = $('.tp-menu').offset().top; 346 347 348 $(window).on("scroll", function() { 349 350 t_obj.sticky_header(lengthHeader); 351 352 353 if (typeof thememsnry !== 'undefined') { 354 355 356 thememsnry.masonry('layout'); 357 } 358 if (typeof blogsmsnry !== 'undefined') { 359 360 361 blogsmsnry.masonry('layout'); 362 } 363 364 365 }); 366 367 368 } 369 370 371 $(window).on("load", function() { 372 373 var item = $("body").find("#preloader"); 374 375 if (item.length) { 376 item.delay(200).fadeOut("slow"); 377 item.css("visibility", "hidden"); 378 379 } 380 381 382 }); 383 384 385}(window.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.