1// US g-alert 2(function ($) { 3 "use strict"; 4 5 $.fn.gAlert = function () { 6 7 return this.each(function () { 8 var alert = $(this), 9 alertClose = alert.find('.g-alert-close'); 10 11 if (alertClose) { 12 alertClose.click(function(){ 13 alert.animate({ height: '0', margin: 0}, 400, function(){ 14 alert.css('display', 'none'); 15 $(window).resize(); 16 }); 17 }); 18 } 19 }); 20 }; 21})(jQuery); 22 23jQuery(document).ready(function() { 24 "use strict"; 25 26 jQuery('.g-alert').gAlert(); 27}); 28 29// US w-tabs 30(function ($) { 31 "use strict"; 32 33 $.fn.wTabs = function () { 34 35 36 return this.each(function () { 37 var tabs = $(this), 38 itemsList = tabs.find('.w-tabs-list'), 39 items = tabs.find('.w-tabs-item'), 40 sections = tabs.find('.w-tabs-section'), 41 resizeTimer = null, 42 itemsWidth = 0, 43 running = false, 44 firstActiveItem = tabs.find('.w-tabs-item.active').first(), 45 firstActiveSection = tabs.find('.w-tabs-section.active').first(), 46 activeIndex = null; 47 48 if (itemsList.length) { 49 var itemsCount = itemsList.find('.w-tabs-item').length; 50 if (itemsCount) { 51 itemsList.addClass('items_'+itemsCount); 52 } 53 } 54 55 if ( ! tabs.hasClass('layout_accordion')) { 56 if ( ! firstActiveSection.length) { 57 firstActiveItem = tabs.find('.w-tabs-item').first(); 58 firstActiveSection = tabs.find('.w-tabs-section').first(); 59 } 60 61 tabs.find('.w-tabs-item.active').removeClass('active'); 62 tabs.find('.w-tabs-section.active').removeClass('active'); 63 64 firstActiveItem.addClass('active'); 65 firstActiveSection.addClass('active'); 66 67 } else { 68 $(sections).each(function(sectionIndex, section) { 69 if ($(section).hasClass('active')) { 70 activeIndex = sectionIndex; 71 } 72 }); 73 } 74 75 76 items.each(function(){ 77 itemsWidth += $(this).outerWidth(true); 78 }); 79 80 function tabs_resize(){ 81 if ( ! (tabs.hasClass('layout_accordion') && ! tabs.data('accordionLayoutDynamic'))) { 82 if (jQuery(window).width() < 768) { 83 tabs.data('accordionLayoutDynamic', true); 84 if ( ! tabs.hasClass('layout_accordion')) { 85 tabs.addClass('layout_accordion'); 86 } 87 } else { 88 if (tabs.hasClass('layout_accordion')) { 89 tabs.removeClass('layout_accordion'); 90 } 91 } 92 } 93 } 94 95 tabs_resize(); 96 97 $(window).resize(function(){ 98 window.clearTimeout(resizeTimer); 99 resizeTimer = window.setTimeout(function(){ 100 tabs_resize(); 101 }, 50); 102 103 }); 104 105 sections.each(function(index){ 106 var item = $(items[index]), 107 section = $(sections[index]), 108 section_title = section.find('.w-tabs-section-header'), 109 section_content = section.find('.w-tabs-section-content'); 110 111 if (section.hasClass('active')) { 112 section_content.slideDown(); 113 } 114 115 section_title.click(function(){ 116 var currentHeight = 0; 117 118 if (tabs.hasClass('type_toggle')) { 119 if ( ! running) { 120 if (section.hasClass('active')) { 121 running = true; 122 if (item) { 123 item.removeClass('active'); 124 } 125 section_content.slideUp(null, function(){ 126 section.removeClass('active'); 127 running = false; 128 $(window).resize(); 129 }); 130 } else { 131 running = true; 132 if (item) { 133 item.addClass('active'); 134 } 135 section_content.slideDown(null, function(){ 136 section.addClass('active'); 137 running = false; 138 section.find('.w-map').each(function(map){ 139 var mapObj = jQuery(this).data('gMap.reference'), 140 center = mapObj.getCenter(); 141 142 google.maps.event.trigger(jQuery(this)[0], 'resize'); 143 if (jQuery(this).data('gMap.infoWindows').length) { 144 jQuery(this).data('gMap.infoWindows')[0].open(mapObj, jQuery(this).data('gMap.overlays')[0]); 145 } 146 mapObj.setCenter(center); 147 }); 148 $(window).resize(); 149 }); 150 } 151 } 152 153 154 } else if (( ! section.hasClass('active')) && ( ! running)) { 155 running = true; 156 items.each(function(){ 157 if ($(this).hasClass('active')) { 158 $(this).removeClass('active'); 159 } 160 }); 161 if (item) { 162 item.addClass('active'); 163 } 164 165 sections.each(function(){ 166 if ($(this).hasClass('active')) { 167 currentHeight = $(this).find('.w-tabs-section-content').height(); 168 if ( ! tabs.hasClass('layout_accordion')) { 169 tabs.css({'height': tabs.height(), 'overflow': 'hidden'}); 170 setTimeout(function(){ tabs.css({'height': '', 'overflow': ''}); }, 300); 171 } 172 $(this).find('.w-tabs-section-content').slideUp(); 173 } 174 }); 175 176 177 178 section_content.slideDown(null, function(){ 179 sections.each(function(){ 180 if ($(this).hasClass('active')) { 181 $(this).removeClass('active'); 182 } 183 }); 184 section.addClass('active'); 185 activeIndex = index; 186 187 if (tabs.hasClass('layout_accordion')){ 188 var hederHeight = jQuery('.l-header').outerHeight(); 189 jQuery("html, body").animate({
190 scrollTop: section.offset().top-(hederHeight-1)+"px" 191 }, { 192 duration: 1200, 193 easing: "easeInOutQuint" 194 }); 195 } 196 197 running = false; 198 section.find('.w-map').each(function(map){ 199 var mapObj = jQuery(this).data('gMap.reference'), 200 center = mapObj.getCenter(); 201 202 google.maps.event.trigger(jQuery(this)[0], 'resize'); 203 if (jQuery(this).data('gMap.infoWindows').length) { 204 jQuery(this).data('gMap.infoWindows')[0].open(mapObj, jQuery(this).data('gMap.overlays')[0]); 205 } 206 mapObj.setCenter(center); 207 }); 208 209 $(window).resize(); 210 }); 211 } 212 213 if (section.parents('.w-portfolio-item').length){ 214 var portfolioItem = section.parents('.w-portfolio-item'), 215 portfolioDetails = portfolioItem.find('.w-portfolio-item-details'); 216 217 window.setTimeout(function() { 218 section.parents('.w-portfolio-item').css({'margin-bottom': portfolioDetails.height()+'px'}); 219 }, 300); 220 } 221 222 }); 223 224 if (item) 225 { 226 item.click(function(){ 227 section_title.click(); 228 }); 229 } 230 231 232 }); 233 234 }); 235 }; 236})(jQuery); 237 238jQuery(document).ready(function() { 239 "use strict"; 240 241 jQuery('.w-tabs').wTabs(); 242}); 243 244// US w-portfolio 245(function ($) { 246 "use strict"; 247 248 $.fn.wPortfolio = function () { 249 250 return this.each(function () { 251 var portfolio = jQuery(this), 252 items = portfolio.find('.w-portfolio-item'), 253 running = false, 254 activeIndex; 255 256 items.each(function(itemIndex, item){ 257 var $item = jQuery(item), 258 $anchor = $item.find('.w-portfolio-item-anchor'), 259 $details = $item.find('.w-portfolio-item-details'), 260 $detailsContent = $item.find('.w-portfolio-item-details-content'), 261 $detailsHiddenContent = $item.find('.w-portfolio-hidden-content'), 262 $detailsClose = $details.find('.w-portfolio-item-details-close'), 263 $detailsNext = $details.find('.w-portfolio-item-details-arrow.to_next'), 264 $detailsPrev = $details.find('.w-portfolio-item-details-arrow.to_prev'), 265 $nextItem = $item.next(), 266 $prevItem = $item.prev(), 267 $window = jQuery(window), 268 itemResize = function(){ 269 if ($item.hasClass('active')) { 270 $item.css('margin-bottom', $details.height()+'px'); 271 } 272 }; 273 274 $anchor.click(function(){ 275 if (( ! $item.hasClass('active')) && ( ! $anchor.hasClass('external-link')) && ( ! running)){ 276 running = true; 277 278 var activeItem = portfolio.find('.w-portfolio-item.active'); 279 280 activeItem.find('.w-portfolio-item-details').hide(); 281 activeItem.find('.w-portfolio-item-details-content').empty(); 282 activeItem.removeClass('active').css('margin-bottom', ''); 283 284 $detailsContent.html($detailsHiddenContent.val().replace(/us_not_textarea/gi, 'textarea')); 285 $details.css({opacity: 0, display: 'block'}); 286 287 if (jQuery.magnificPopup){ 288 $details.find('a[ref=magnificPopup][class!=direct-link]').magnificPopup({ 289 type: 'image' 290 }); 291 } 292 293 $detailsContent.find('.w-tabs').wTabs(); 294 $detailsContent.find('.g-alert').gAlert(); 295 296 if (jQuery().wpcf7InitForm !== undefined){ 297 $detailsContent.find('div.wpcf7 > form').find('img.ajax-loader').remove(); 298 $detailsContent.find('div.wpcf7 > form').wpcf7InitForm(); 299 } 300 301 if (jQuery().fotorama){ 302 $detailsContent.find('.fotorama').each(function(){ 303 var $this = jQuery(this); 304 $this.fotorama({ 305 spinner: { 306 lines: 13, 307 color: 'rgba(0, 0, 0, .75)' 308 } 309 }); 310 $this.on('fotorama:ready', function(){ 311 setTimeout(itemResize, 50); 312 }); 313 }); 314 } 315 316 $details.stop().animate({opacity: 1}, 300, function(){ 317 $details.css({opacity: ''}); 318 $window.resize(); 319 }); 320 321 $item.css('margin-bottom', $details.height()+'px'); 322 $details.imagesLoaded().always(function(){ 323 setTimeout(itemResize, 50); 324 }); 325 326 $window.on('resize', itemResize); 327 328 var hederHeight = jQuery('.l-header').outerHeight(); 329 jQuery("html, body").animate({
330 scrollTop: $item.offset().top+0.7*$anchor.height()+1-hederHeight+"px" 331 }, { 332 duration: 1000, 333 easing: "easeInOutQuad" 334 }); 335 336 $item.addClass('active'); 337 activeIndex = itemIndex; 338 running = false; 339 340 } 341 }); 342 343 $detailsClose.off('click').click(function(){ 344 $details.slideUp(300, function(){ 345 $details.find('.w-portfolio-item-details-content').empty(); 346 }); 347 $item.removeClass('active').animate({'margin-bottom': 0}, 300); 348 $window.on('resize', itemResize); 349 }); 350 351 if ($nextItem.length){ 352 $detailsNext.off('click').click(function(){ 353 $nextItem.find('.w-portfolio-item-anchor').click(); 354 }); 355 } else { 356 $detailsNext.hide(); 357 } 358 359 if ($prevItem.length){ 360 $detailsPrev.off('click').click(function(){ 361 $prevItem.find('.w-portfolio-item-anchor').click(); 362 }); 363 } else { 364 $detailsPrev.hide(); 365 } 366 367 }); 368 }); 369 }; 370})(jQuery); 371 372jQuery(document).ready(function() { 373 "use strict"; 374 375 jQuery('.w-portfolio').wPortfolio(); 376});
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.