1jQuery(document).ready(function ($) { 2 "use strict"; 3 4 var $ = jQuery, 5 screenRes = $(window).width(), 6 screenHeight = $(window).height(), 7 innerScreenRes = window.innerWidth, // Screen size width minus scrollbar width 8 html = $('html'); 9 10 // Disable Empty Links 11 $('a[href="#"]').click(function (event) { 12 event.preventDefault(); 13 }); 14 15 // Remove outline in IE 16 $("a, input, textarea").attr("hideFocus", "true").css("outline", "none"); 17 18 // selectize control input 19 Selectize.define('selectize_control_input', function(options) { 20 var self = this; 21 this.showInput = function() { 22 this.$control.css({cursor: 'pointer'}); 23 this.$control_input.css({opacity: 0, position: 'relative', left: self.rtl ? 10000 : -10000 }); 24 this.isInputHidden = false; 25 }; 26 27 this.setup_original = this.setup; 28 29 this.setup = function() { 30 self.setup_original(); 31 this.$control_input.prop("disabled","disabled"); 32 } 33 }); 34 35 var selectize_selectors = '.fw-contact-form .select-field, select[name="archive-dropdown"], select[name="cat"], select[name="monster-widget-just-testing"], .fw-search-filter-off .woocommerce-ordering .orderby, .dropdown_product_cat, select.country_select, select.state_select, #calc_shipping_country, .bbpress select:not("#theme"), .buddypress select:not("#theme"), .wpcf7-select, .llms-field-select, .mc4wp-form .mc4wp-form-fields select, .gform_wrapper select:not(.ginput_card_expiration)'; 36 if( screenRes < 1025 ) { 37 $(selectize_selectors).selectize({ 38 create: true, 39 allowEmptyOption: true, 40 plugins: ['selectize_control_input'] 41 }); 42 } 43 else { 44 $(selectize_selectors).selectize({ 45 create: true, 46 allowEmptyOption: true 47 }); 48 } 49 50 // Woocommerce if the country has regions (ex. USA) 51 if( $('#billing_state_field').length > 0 && typeof wc_country_select_params !== 'undefined' ) { 52 var states_json = wc_country_select_params.countries.replace( /"/g, '"' ), 53 states = $.parseJSON( states_json ); 54 $( document.body ).on( 'change', 'select.country_to_state, input.country_to_state', function() { 55 var country = $(this).val(); 56 57 if (states[country]) { 58 // is select 59 if ($.isEmptyObject(states[country])) { 60 // has no state 61 } 62 else { 63 $('#billing_state_field select.state_select').selectize({ 64 create: true, 65 allowEmptyOption: true 66 }); 67 } 68 } 69 else { 70 // is input 71 $('#billing_state_field .selectize-control').remove(); 72 } 73 }); 74 } 75 76 start_carousel_portfolio_filter(); 77 78 // ContactForm7 preppend label for acceptance checkbox 79 if($('.wpcf7-form').length > 0) { 80 $('input.wpcf7-acceptance').wrap('<span class="wpcf7-list-item"></span>').parent().prepend('<span class="wpcf7-list-item-label acceptance-check"></span>'); 81 } 82 83 if ($(".input-styled, #ship-to-different-address, .inputs, .create-account, .inline, .bbp_widget_login .bbp-remember-me, .bbpress, .forgetmenot, .buddypress, .give-form-wrap, .wpcf7-form, .mc4wp-form, .gform_wrapper").length) { 84 $(".input-styled input, #ship-to-different-address input, .inputs input[type='radio'], .inputs input[type='checkbox'], .create-account input, .inline #rememberme, .bbp-remember-me #rememberme, .bbpress input[type='radio'], .bbpress input[type='checkbox'], .forgetmenot #bp-login-widget-rememberme, .buddypress input[type='checkbox'], .buddypress input[type='radio'], .give-form-wrap input[type='radio'], .wpcf7 input[type='checkbox'], .wpcf7 input[type='radio'], .mc4wp-form input[type='radio'], .mc4wp-form input[type='checkbox'], .gform_wrapper input[type='radio'], .gform_wrapper input[type='checkbox']").customInput(); 85 } 86 87 // prettyPhoto lightbox, check if <a> has atrr data-rel and hide for Mobiles 88 start_prettyphoto(); 89 90 // Remove background cart 91 jQuery('.shop_table.cart').parent('form').css({ 92 'background-color': 'transparent', 93 'padding': '0' 94 }); 95 96 // Set width for divider on pagination type 2 97 function widthDividerPostPagination2 (){ 98 var paginationContainerWidth = jQuery('.paging-navigation-type-2').outerWidth()/2, 99 buttonPrevWidth = jQuery('.paging-navigation-type-2 .prev').outerWidth(), 100 buttonNextWidth = jQuery('.paging-navigation-type-2 .next').outerWidth(), 101 numbersWrap = jQuery('.paging-navigation-type-2 .pagination-numbers-wrap').outerWidth()/2; 102 103 jQuery('.paging-navigation-type-2 .before-hr').css({ 104 'width': paginationContainerWidth - numbersWrap - buttonPrevWidth, 105 'left': buttonPrevWidth 106 }); 107 jQuery('.paging-navigation-type-2 .after-hr').css({ 108 'width': paginationContainerWidth - numbersWrap - buttonNextWidth, 109 'right': buttonNextWidth 110 }); 111 } 112 if(jQuery('.paging-navigation.paging-navigation-type-2').length > 0){ 113 widthDividerPostPagination2(); 114 $(window).resize(function(){ widthDividerPostPagination2(); }); 115 } 116 117 // Show more events 118 $('.fw-show-more-events').on('click', function () { 119 if ($(this).hasClass('closed')) { 120 $(this).removeClass('closed').addClass('open'); 121 $('.fw-more-events-content').slideDown(800); 122 } 123 else { 124 $(this).removeClass('open').addClass('closed'); 125 $('.fw-more-events-content').slideUp(800); 126 } 127 }); 128 129 //Iframe Serponsive 130 function adjustIframes() { 131 $('iframe').each(function () { 132 var $this = $(this), 133 proportion = $this.data('proportion'), 134 w = $this.attr('width'), 135 actual_w = $this.width(); 136 137 if (!proportion) { 138 proportion = $this.attr('height') / w; 139 $this.data('proportion', proportion); 140 } 141 142 if (actual_w != w) { 143 $this.css('height', Math.round(actual_w * proportion) + 'px'); 144 } 145 }); 146 } 147 $(window).on('resize load', adjustIframes); 148 149 // Detect Click in Iframe 150 function detectIframeClick() { 151 var overiFrame = -1; 152 jQuery('.myCarousel').find('iframe').hover(function () { 153 overiFrame = 1; 154 }, function () { 155 overiFrame = -1 156 }); 157 $(window).on('blur', function () { 158 if (overiFrame != -1) { 159 jQuery('.myCarousel').carousel('pause'); 160 } 161 }); 162 jQuery('.carousel-control, .carousel-indicators li').click(function () { 163 jQuery('.myCarousel').carousel('cycle'); 164 }); 165 } 166 detectIframeClick(); 167 168 // Smooth Scroling of ID anchors 169 function filterPath(string) { 170 return string 171 .replace(/^\//, '') 172 .replace(/(index|default).[a-zA-Z]{3,4}$/, '') 173 .replace(/\/$/, ''); 174 } 175 176 var locationPath = filterPath(location.pathname); 177 var scrollElem = scrollableElement('html', 'body'); 178 179 function anchorFn(argument) { 180 var HeaderHeightNormal = 0, 181 HeaderHeightSticky = 0; 182 183 $('.anchor a[href*="#"], a[href*="#"].anchor').each(function () { 184 $(this).click(function (event) { 185 // only if is sticky header calculate the headers height for know the offset, in other case the header height is 0 186 if( $(this).parents('body.fw-header-sticky').find('.fw-sticky-menu').length > 0 && screenRes > 767 ) { 187 HeaderHeightSticky = $('.fw-header.fw-sticky-menu').height(); // Sticky header height 188 189 var HeaderHeight = HeaderHeightSticky; 190 } 191 else { 192 var HeaderHeight = HeaderHeightNormal; 193 } 194 195 var thisPath = filterPath(this.pathname) || locationPath; 196 if (locationPath == thisPath 197 && (location.hostname == this.hostname || !this.hostname) 198 && this.hash.replace(/#/, '')) { 199 var $target = $(this.hash), target = this.hash; 200 if (target && $target.length != 0) { 201 var targetOffset = $target.offset().top - HeaderHeight; 202 event.preventDefault(); 203 $(scrollElem).animate({scrollTop: targetOffset}, 400);
204 if( 'false' == FwPhpVars.disable_anchor_id ) { 205 setTimeout( function(){ 206 location.hash = target; 207 }, 300 ); 208 } 209 } 210 } 211 }); 212 }); 213 } 214 215 // Scroll To Top Button 216 $(window).on('scroll', function() { 217 if(jQuery('.scroll-to-top').length > 0){ 218 if(parseInt($(window).scrollTop(), 10) > 600){ 219 jQuery('.scroll-to-top').fadeIn(500); 220 } 221 else { 222 jQuery('.scroll-to-top').fadeOut(500); 223 } 224 } 225 }); 226 227 // use the first element that is "scrollable" 228 function scrollableElement(els) { 229 for (var i = 0, argLength = arguments.length; i < argLength; i++) { 230 var el = arguments[i], 231 $scrollElement = $(el); 232 if ($scrollElement.scrollTop() > 0) { 233 return el; 234 } else { 235 $scrollElement.scrollTop(1); 236 var isScrollable = $scrollElement.scrollTop() > 0; 237 $scrollElement.scrollTop(0); 238 if (isScrollable) { 239 return el; 240 } 241 } 242 } 243 return []; 244 } 245 246 // Header Type 5 (close & open Menu) 247 if(jQuery('.header-5').length > 0) { 248 var $headerMenu5 = jQuery('#header-menu'); 249 250 $headerMenu5.find('.mega-menu-col').each( function(){ 251 var megaMenuCol = $(this); 252 megaMenuCol.find('a[href="#"]').parent().addClass('linkBlank'); 253 254 $('.linkBlank').each(function() { 255 var linkBlank = $(this); 256 if(linkBlank.children().length === 1) { 257 linkBlank.addClass('removeItem'); 258 linkBlank.parent().addClass('removeItem') 259 } 260 }); 261 $('ul.removeItem').each(function() { 262 var removeItem = $(this); 263 removeItem.find('li.removeItem').remove(); 264 removeItem.children().length === 0 ? removeItem.remove() : null; 265 }); 266 }); 267 $('.linkBlank').removeClass('linkBlank'); 268 $('.removeItem').removeClass('removeItem'); 269 270 271 // Create Menu 272 $headerMenu5.mmenu({ 273 extensions: [ 274 "pageshadow", 275 FwPhpVars.effect_panels, 276 FwPhpVars.effect_listitems_slide 277 ], 278 offCanvas : { 279 position : FwPhpVars.header_5_position, 280 zposition : "front" 281 } 282 }); 283 284 // Prepend Close Button 285 jQuery('#header-menu.mm-menu').prepend('<a href="#" class="fw-close-menu-header5"><i class="mm-close"></i></a>'); 286 287 // Change Position for .mm-next when menu is aligned center 288 if(jQuery('.header-align-center').length > 0){ 289 jQuery('.mm-listview .menu-item a.mm-next').each(function(){ 290 $(this).appendTo($(this).parent()); 291 $(this).parents('.mm-panel').addClass('fw-list-has-children'); 292 }); 293 } 294 295 // Add keyword "Back" in back button 296 jQuery('.mm-btn.mm-prev').html('<span>'+FwPhpVars.back+'</span>'); 297 298 // Close the menu, click the close button('X') 299 var API = $headerMenu5.data("mmenu"); 300 $headerMenu5.find('.fw-close-menu-header5').click(function() { 301 API.close(); 302 }); 303 304 // Add class "video-panel" if bg video is set, add class "wallpaper" in header nav 305 if( $headerMenu5.is("[data-background-options]") ) { 306 jQuery('.fw-menu-open').on('click', function() { 307 $headerMenu5.background(); 308 }); 309 } 310 } 311 312 // Header Type 6 313 if(jQuery('.header-6').length > 0) { 314 // Copy Logo HTML and insert in clone 315 var logoHTML = jQuery('.fw-header-main .fw-wrap-logo'); 316 317 // Create New Menu 318 var $headerMenu = jQuery('#header-menu'); 319 320 // Remove link if is blank 321 $headerMenu.find('.mega-menu-col').each( function(){ 322 var megaMenuCol = $(this); 323 megaMenuCol.find('a[href="#"]').parent().addClass('linkBlank'); 324 325 $('.linkBlank').each(function() { 326 var linkBlank = $(this); 327 if(linkBlank.children().length === 1) { 328 linkBlank.addClass('removeItem'); 329 linkBlank.parent().addClass('removeItem') 330 } 331 }); 332 $('ul.removeItem').each(function() { 333 var removeItem = $(this); 334 removeItem.find('li.removeItem').remove(); 335 removeItem.children().length === 0 ? removeItem.remove() : null; 336 }); 337 }); 338 $('.linkBlank').removeClass('linkBlank'); 339 $('.removeItem').removeClass('removeItem'); 340 341 // Create Menu 342 $headerMenu.mmenu({ 343 navbars: [{ 344 content: [ logoHTML ] 345 }, 346 { 347 position: "bottom", 348 content: [ FwPhpVars.socials ] 349 } 350 ], 351 extensions: [ 352 "widescreen", 353 FwPhpVars.effect_panels 354 ], 355 offCanvas: { 356 position: FwPhpVars.header_6_position 357 } 358 }); 359 360 // Calculate logo height and add top position to menu 361 if ( logoHTML.find('img').attr('src') == undefined ) { 362 // if logo is text 363 var logoHeight = jQuery('.fw-wrap-logo').parent().outerHeight(), // Find height for a parent, because user possibility adds additional padding. And for this cause height for the logo doesn't correctly calculate. 364 mmPanels = jQuery('.mm-panels'); 365 366 mmPanels.css({ 367 top: logoHeight + 20 368 }); 369 } 370 else { 371 var logoImg = new Image(); 372 logoImg.src = logoHTML.find('img').attr('src'); 373 logoImg.onload = function () { 374 var logoHeight = jQuery('.fw-wrap-logo').outerHeight(), 375 mmPanels = jQuery('.mm-panels'); 376 377 mmPanels.css({ 378 top: logoHeight + 20 379 }); 380 }; 381 } 382 383 // Add keyword "Back" in back button 384 jQuery('.mm-btn.mm-prev').html('<span>'+FwPhpVars.back+'</span>'); 385 386 // Change Position for .mm-next when menu is aligned left & center 387 if(jQuery('.header-item-align-left, .header-item-align-center').length > 0){ 388 jQuery('.mm-listview .menu-item a.mm-next').each(function(){ 389 $(this).appendTo($(this).parent()); 390 $(this).parents('.mm-panel').addClass('fw-list-has-children'); 391 }); 392 } 393 394 // Add search in menu if search it is positioned in menu 395 if(jQuery('.search-in-menu').length > 0){ 396 var searchHtml = jQuery('.fw-search'), 397 fullSearchHtml = jQuery('.fw-wrap-search-form.fw-form-search-full'); 398 399 $headerMenu.children().children('.mm-panel').append(searchHtml); 400 $headerMenu.append(fullSearchHtml); 401 } 402 else if(jQuery('.search-in-top-bar .fw-wrap-search-form.fw-form-search-full').length > 0){ 403 fullSearchHtml = jQuery('.fw-wrap-search-form.fw-form-search-full'); 404 $headerMenu.append(fullSearchHtml); 405 } 406 407 // Close the menu, click the close button('X') 408 var API = $headerMenu.data("mmenu"); 409 $headerMenu.find('.fw-menu-open').click(function() { 410 API.close(); 411 }); 412 if(screenRes < 1200) { 413 jQuery('.site').click(function(){ 414 API.close(); 415 }); 416 } 417 } 418 419 // Responsive Menu (Mobile Menu for header type 1 -> 4) 420 var Mobile_Menu = function () { 421 var $menu = jQuery('#mobile-menu'), 422 navPosition = 'bottom'; 423 424 $menu.find('.mega-menu-col').each( function(){ 425 var megaMenuCol = $(this); 426 megaMenuCol.find('a[href="#"]').parent().addClass('linkBlank'); 427 428 $('.linkBlank').each(function() { 429 var linkBlank = $(this); 430 if(linkBlank.children().length === 1) { 431 linkBlank.addClass('removeItem'); 432 linkBlank.parent().addClass('removeItem') 433 } 434 }); 435 $('ul.removeItem').each(function() { 436 var removeItem = $(this); 437 removeItem.find('li.removeItem').remove(); 438 removeItem.children().length === 0 ? removeItem.remove() : null; 439 }); 440 }); 441 $('.linkBlank').removeClass('linkBlank'); 442 $('.removeItem').removeClass('removeItem'); 443 444 // If social variables is empty change nav position 445 if(FwPhpVars.socials === ''){ 446 navPosition = 'top'; 447 } 448 449 // Create menu 450 $menu.mmenu({ 451 counters: true, 452 extensions: [ 453 "theme-dark", 454 FwPhpVars.effect_panels, 455 FwPhpVars.mobile_menu_page_dim, 456 FwPhpVars.mobile_menu_border_style 457 ], 458 navbar: { 459 title: FwPhpVars.mmenu_title 460 }, 461 navbars : [ 462 { 463 "add": false, 464 "position": navPosition, 465 "content": [ FwPhpVars.socials ] 466 } 467 ], 468 offCanvas: { 469 position: FwPhpVars.mobile_menu_position 470 } 471 }, { 472 classNames: { 473 selected: "current-menu-item" 474 }, 475 offCanvas: { 476 pageSelector: "#page",
477 wrapPageIfNeeded: false 478 } 479 }); 480 481 // Change Position for .mm-next & counter when menu is aligned center 482 if(jQuery('.mobile-menu-item-align-center').length > 0){ 483 jQuery('.mm-listview .menu-item a.mm-next').each(function(){ 484 var mmCounter = $(this).parent().find('.mm-counter'); 485 jQuery('<div class="mobile-menu-wrap-navigation"></div>').appendTo($(this).parent()); 486 487 var mobileMenuWrapNavigation = $(this).parent().find('.mobile-menu-wrap-navigation'); 488 mobileMenuWrapNavigation.append(mmCounter, $(this)); 489 }); 490 } 491 492 if( $menu.length == 0 ) { 493 return; 494 } 495 496 // Close menu to click on any item 497 var API = $menu.data( "mmenu" ); 498 $menu.find('li.menu-item a:not(".mm-next")').click(function() { 499 API.close(); 500 }); 501 502 /** 503 * Add class to tag HTML for events 'Close & Open' because transition: transform for div 'mm-slideout', 504 * on iOS creates bug when you click back in browser. The page is not centered. 505 */ 506 API.bind( "open", function() { 507 $menu.parents('html').addClass('mm-menu-event-open'); 508 }); 509 API.bind( "closed", function() { 510 $menu.parents('html').removeClass('mm-menu-event-open'); 511 }); 512 }; 513 if (innerScreenRes <= FwPhpVars.mobile_menu_screen && $('.header-1, .header-2, .header-3, .header-4').length) { 514 Mobile_Menu(); 515 } 516 517 $(window).on('resize', function(){ 518 var innerScreenRes = window.innerWidth; // Screen size width minus scrollbar width 519 if(innerScreenRes <= FwPhpVars.mobile_menu_screen && $('.header-1, .header-2, .header-3, .header-4').length){ 520 Mobile_Menu(); 521 } 522 }); 523 524 // Sticky Menu 525 if(jQuery('body.fw-header-sticky').length > 0 && screenRes > FwPhpVars.sticky_resolution) { 526 jQuery('.fw-header').clone().addClass('fw-sticky-menu').prependTo('div.site'); 527 528 529 // Add sticky logo if this is add in sticky. 530 if(FwPhpVars.sticky_logo !== ''){ 531 // Insert new sticky logo in menu 532 $('.fw-header.fw-sticky-menu .fw-wrap-logo').html(FwPhpVars.sticky_logo); 533 534 // Calculate position after logo image is loaded and just for header-1 & header-5. 535 if($('.header-1, .header-5').length) { 536 $('.header-1 .fw-sticky-menu, .header-5 .fw-sticky-menu').addClass('fw-header-sticky-new-logo'); 537 538 var stickyLogoImg = new Image(); 539 stickyLogoImg.src = $('.fw-header.fw-sticky-menu .fw-wrap-logo').find('img').attr('src'); 540 stickyLogoImg.onload = function () { 541 var logoHeight = jQuery('.fw-header.fw-sticky-menu .fw-wrap-logo').outerHeight(), 542 menuHeight = parseInt($('.fw-header.fw-sticky-menu .fw-site-navigation > ul > li > a').css('line-height'), 10), 543 searchHeight = $('.fw-header.fw-sticky-menu .fw-search').outerHeight(), 544 mobileMenuIconOpen = $('.fw-header.fw-sticky-menu .mmenu-link').outerHeight(), 545 mobileMenuIconOpenHeader5 = $('.header-5 .fw-header.fw-sticky-menu .fw-nav-wrap').outerHeight(); 546 547 // For Header 1 548 if (logoHeight > menuHeight && $('.header-1').length) { 549 $('.header-1 .fw-sticky-menu .primary-navigation').css({ 550 'margin-top': logoHeight / 2 - menuHeight / 2 551 }); 552 $('.header-1 .fw-sticky-menu .fw-search').css({ 553 'margin-top': logoHeight / 2 - searchHeight / 2 554 }); 555 $('.header-1 .fw-sticky-menu .mmenu-link').css({ 556 'margin-top': logoHeight / 2 - mobileMenuIconOpen / 2 557 }); 558 } 559 // For Header 5 560 else if (logoHeight > mobileMenuIconOpenHeader5 && $('.header-5').length) { 561 $('.header-5 .fw-sticky-menu .fw-search').css({ 562 'margin-top': logoHeight / 2 - searchHeight / 2 563 }); 564 $('.header-5 .fw-sticky-menu .fw-nav-wrap').css({ 565 'margin-top': logoHeight / 2 - mobileMenuIconOpenHeader5 / 2 566 }); 567 } 568 // For Header 1 569 else if (logoHeight <= menuHeight && $('.header-1').length) {
570 $('.header-1 .fw-sticky-menu .fw-wrap-logo').css({ 571 'margin-top': menuHeight / 2 - logoHeight / 2 572 }); 573 $('.header-1 .fw-sticky-menu .fw-search').css({ 574 'margin-top': menuHeight / 2 - searchHeight / 2 575 }); 576 $('.header-1 .fw-sticky-menu .mmenu-link').css({ 577 'margin-top': menuHeight / 2 - mobileMenuIconOpen / 2 578 }); 579 } 580 // For Header 5 581 else if (logoHeight <= mobileMenuIconOpenHeader5 && $('.header-5').length) { 582 $('.header-5 .fw-sticky-menu .fw-wrap-logo').css({ 583 'margin-top': mobileMenuIconOpenHeader5 / 2 - logoHeight / 2 584 }); 585 $('.header-5 .fw-sticky-menu .fw-search').css({ 586 'margin-top': mobileMenuIconOpenHeader5 / 2 - searchHeight / 2 587 }); 588 } 589 }; 590 } 591 } 592 593 var height_original_header = jQuery('header.fw-header').not('header.fw-header.fw-sticky-menu').outerHeight(); 594 595 // make anchor form sticky menu with smooth scroll 596 anchorFn(); 597 598 $(window).on('scroll', function () { 599 if(height_original_header > 300){ 600 var intermediate_height = height_original_header + 250; 601 } else { 602 var intermediate_height = 400; 603 } 604 605 // add or remove class "fw-sticky-menu-open" 606 if ($(window).scrollTop() > intermediate_height) { 607 // Scroll Down 608 $('.fw-header.fw-sticky-menu').addClass('fw-sticky-menu-open'); 609 } else { 610 // Scroll Up 611 $('.fw-header.fw-sticky-menu').removeClass('fw-sticky-menu-open'); 612 } 613 }); 614 615 // complete search form on keyup 616 jQuery('.fw-header .fw-search-form .fw-input-search').on("keyup", function() { 617 var search_input = jQuery(this).val(); 618 jQuery('.fw-header .fw-search-form .fw-input-search').val(search_input); 619 }); 620 } 621 else { 622 anchorFn(); 623 } 624 625 // DropDown 626 if(screenRes > 1199){ 627 jQuery(".fw-nav-menu li.menu-item-has-children").not("li.menu-item-has-mega-menu, .header-6 #header-menu.mm-menu .mm-listview li, .header-5 .mm-listview li").hover(function () { 628 var $this = $(this); 629 if ($this.find('.sub-menu')) { 630 var dropdown = $this.children('ul'), 631 dropdownWidth = dropdown.outerWidth(), 632 dropdownOffset = parseInt(dropdown.offset().left, 10); 633 if (dropdownWidth + dropdownOffset > screenRes) { 634 dropdown.addClass('left'); 635 } 636 else { 637 dropdown.removeClass('left'); 638 } 639 } 640 }); 641 } 642 // Search Icon Button 643 var miniSearch = function () { 644 var container_menu_width = jQuery('.fw-header .fw-site-navigation, .header-5 .fw-header .fw-menu-open').parents('.fw-header-main').width()-15, 645 wrap_search_form = jQuery('.fw-wrap-search-form'); 646 647 // Close the search form 648 jQuery('body').on('click', '.fw-close-search-form', function (event) { 649 event.preventDefault(); 650 jQuery('.fw-wrap-search-form').slideUp(300, function () { 651 wrap_search_form.removeClass('opened'); 652 }); 653 }); 654 655 jQuery('.fw-search-icon').click(function (event) { 656 event.preventDefault(); 657 658 // No set height for search in header type 6 659 if(jQuery('.header-6').length < 1) { 660 var menu_height = jQuery('.fw-header-main').not('.fw-header.fw-sticky-menu .fw-header-main').outerHeight(); 661 wrap_search_form.css('height', menu_height); 662 663 // Set width for input 664 wrap_search_form.children('.fw-search-form').css({ 665 width: container_menu_width 666 }); 667 668 // If topBar is enable 669 if (jQuery('.fw-top-bar-on').length > 0) { 670 var topBar_height = jQuery('.fw-top-bar').outerHeight(); 671 672 wrap_search_form.css({ 673 top: topBar_height 674 }); 675 } 676 else { 677 wrap_search_form.css({ 678 top: 0 679 }); 680 } 681 682 // If header is sticky 683 if (jQuery('.fw-header-sticky').length > 0) { 684 var wrap_search_form_sticky = jQuery('.fw-header.fw-sticky-menu .fw-wrap-search-form'), 685 menu_height_sticky = jQuery('.fw-header.fw-sticky-menu .fw-header-main').outerHeight(); 686 687 wrap_search_form_sticky.css('height', menu_height_sticky); 688 } 689 } 690 691 // Animation opened form 692 jQuery('.fw-wrap-search-form').slideDown(300, function () { 693 wrap_search_form.addClass('opened'); 694 }); 695 696 // Focus on sticky search if you click on icon in sticky menu 697 if(jQuery('.search-in-menu.fw-header-sticky .fw-sticky-menu.fw-sticky-menu-open').length > 0){ 698 jQuery('.fw-header.fw-sticky-menu .fw-input-search').on('click').focus(); 699 } 700 else{ 701 jQuery('.fw-header .fw-input-search').on('click').focus(); 702 } 703 }); 704 705 // Close the search form if click outside 706 jQuery(document).mouseup(function (e) { 707 var container = jQuery('.fw-wrap-search-form.fw-form-search-full'); 708 709 if (!container.is(e.target) // if the target of the click isn't the container... 710 && container.has(e.target).length === 0) // ... nor a descendant of the container 711 { 712 jQuery('.fw-wrap-search-form').slideUp(300, function () { 713 wrap_search_form.removeClass('opened'); 714 }); 715 } 716 }); 717 718 // First remove and append the close button for search form. Because to resize window first and only then to remove and to add button. 719 jQuery('.fw-close-search-form').remove(); 720 jQuery('.fw-search-form').append('<a href="#" class="fw-close-search-form"><i class="fa fa-close"></i></a>'); 721 }; 722 723 if (jQuery('.fw-mini-search').length > 0) { 724 miniSearch(); 725 726 jQuery(window).on('resize', function(){ 727 miniSearch(); 728 }); 729 } 730 731 // Toggles 732 $('.toggle-link').click(function () { 733 $(this).parents('.toggle').removeClass('collapsed'); 734 735 if (!$(this).hasClass('collapsed')) { 736 $(this).parents('.toggle').addClass('collapsed'); 737 } 738 }); 739 740 $(".opened").find(".panel-collapse").addClass("in");
741 $(".panel-toggle").click(function () { 742 $(this).closest(".toggleitem").toggleClass("opened"); 743 }); 744 745 // pricing 746 function tablePriceInit() { 747 $(".fw-price-table").each(function () { 748 var this_table_width = $(this).width(); 749 var this_table_cols = $(this).children().size(); 750 var this_col_width = (this_table_width / this_table_cols); 751 752 $(this).children(".fw-price-col").css('width', this_col_width - 1); 753 754 var table_col_height = 0; 755 var this_col_row = $(this).children().find(".fw-price-row, .fw-switch-row"); 756 this_col_row.each(function () { 757 table_col_height = table_col_height > $(this).height() ? table_col_height : $(this).height(); 758 }); 759 this_col_row.each(function () { 760 $(this).height(table_col_height); 761 }); 762 }); 763 } 764 765 if ($('.fw-price-table').length) { 766 tablePriceInit(); 767 768 $(window).on('resize', function () { 769 tablePriceInit(); 770 }); 771 } 772 773 // Icon Box Type 4 set z-index 774 if($('.fw-iconbox-4.fw-icon-right').length > 0) { 775 var iconDIv = $('.fw-iconbox-4.fw-icon-right'); 776 777 iconDIv.each(function(){ 778 var lengthCol = $(this).parents('.fw-row').children('div[class*="fw-col-"]').length, 779 z_index = 10 + lengthCol; // default col z-index & + col length in row 780 781 $(this).parents('.fw-row > div[class*="fw-col-"]').addClass('icon-box-z-index'); 782 783 $(this).parents('.fw-row').children('div[class*="icon-box-z-index"]').each(function (col) { 784 $(this).css("z-index", z_index - col); 785 }); 786 }); 787 } 788 789 /** 790 * Mega Menu 791 */ 792 jQuery(function ($) { 793 794 function leftSide(elem) { 795 return elem.offset().left; 796 } 797 798 function rightSide(elem) { 799 return elem.offset().left + elem.width(); 800 } 801 802 function columns(mega) { 803 var columns = 0; 804 mega.children('.mega-menu-row').each(function () { 805 columns = Math.max(columns, $(this).children('.mega-menu-col').length); 806 }); 807 return columns; 808 } 809 810 function megaMenu(megaMenuSelector) { 811 $(megaMenuSelector).each(function () { 812 var a = $(this); 813 var nav = a.closest('.fw-container'); 814 var mega = a.find('.mega-menu'); 815 var offset = rightSide(nav) - leftSide(a); 816 var col_width = 280 + 2; // 2px border left 817 var col_width2 = a.closest('.fw-container').width() / columns(mega); 818 819 820 if (columns(mega) < 4) { 821 mega.width(Math.min(rightSide(nav), columns(mega) * col_width)); 822 mega.children('.mega-menu-row').each(function () { 823 $(this).children('.mega-menu-col').css('width', col_width); 824 }); 825 } else { 826 mega.width(Math.min(rightSide(nav), columns(mega) * col_width2)); 827 mega.children('.mega-menu-row').each(function () { 828 $(this).children('.mega-menu-col').css('width', col_width2, 'important'); 829 }); 830 } 831 mega.css('left', (Math.min(0, offset - mega.width())) + 15); 832 }); 833 } 834 835 if($('.header-1, .header-2, .header-3, .header-4').length) { 836 megaMenu('.fw-site-navigation .menu-item-has-mega-menu'); 837 } 838 839 $('.fw-header .menu-item-has-mega-menu').hover(function () { 840 $(this).find('.mega-menu').css('display', 'block'); 841 }, function () { 842 $(this).find('.mega-menu').css('display', 'none'); 843 }); 844 845 // Add Class for mega menu on ie9+ and Mozilla Firefox on Mac OS X if exist select 846 var FFMac = !(window.mozInnerScreenX == null), 847 msie10 = window.navigator.userAgent.indexOf("MSIE"), 848 msie11 = !!navigator.userAgent.match(/Trident.*rv\:11\./); 849 850 if( (FFMac && navigator.platform.indexOf('Mac') >= 0) || msie10 > 0 || msie11 > 0) { 851 var megaMenuSelect = $(".fw-header .menu-item-has-mega-menu .mega-menu select"); 852 853 megaMenuSelect.on('click', function(eventAddClassMegaMenu){ 854 $(this).parents('.mega-menu').addClass('mega-menu-select'); 855 856 // Remove class 'mega-menu-select' for mega menu 857 $('.site').on('click', function(){ 858 $('.mega-menu').removeClass("mega-menu-select"); 859 }); 860 eventAddClassMegaMenu.stopPropagation(); 861 }); 862 } 863 864 $(window).on('resize', function () { 865 if($('.header-1, .header-2, .header-3, .header-4').length) { 866 megaMenu('.fw-site-navigation .menu-item-has-mega-menu'); 867 } 868 869 }) 870 }); 871 // Align middle the heading title but header is absolute and if section-main-row-custom it has class: fw-content-overlay-sm, fw-content-overlay-md, fw-content-overlay-lg and fw-content-overlay-custom 872 function sectionTopOverlay() { 873 $('.fw-main-row-top.fw-content-vertical-align-middle .fw-row').css('display', 'block'); 874 875 // Set default padding for elements 876 var section_top_inner_elements = $('.fw-main-row-top.fw-content-vertical-align-middle .fw-row:first-child div[class*="fw-col-sm-"]'); 877 section_top_inner_elements.css('paddingTop', '0'); 878 879 // Calculate & identify the elements 880 var header_height = $('.fw-header .fw-header-main').outerHeight(), 881 theme_content_density = Math.abs(parseInt($('.fw-main-row-top.fw-content-vertical-align-middle div[class*="fw-container-"]').css('paddingTop'))), 882 section_top_height = $('.fw-main-row-top.fw-content-vertical-align-middle').outerHeight(), 883 section_overlap_margin = Math.abs(parseInt($('.fw-content-overlay-sm, .fw-content-overlay-md, .fw-content-overlay-lg, .fw-content-overlay-custom').css('marginBottom'))), 884 section_top_middle_area_center = (section_top_height - header_height - section_overlap_margin)/ 2, 885 section_top_height_inner_element = $('.fw-main-row-top.fw-content-vertical-align-middle .fw-container-fluid, .fw-main-row-top.fw-content-vertical-align-middle .fw-container').height()/ 2, 886 paddTop = ((header_height + section_top_middle_area_center) - section_top_height_inner_element); 887 888 if($('.fw-main-row-top.fw-content-vertical-align-middle.fw-section-no-padding').length){ 889 section_top_inner_elements.css('paddingTop', paddTop); 890 } 891 else {
892 section_top_inner_elements.css('paddingTop', (paddTop - theme_content_density)); 893 } 894 } 895 896 // Align middle the heading title but header is absolute 897 function sectionTopAlignHeaderIsAbsolut(){ 898 $('.fw-main-row-top.fw-content-vertical-align-middle .fw-row').css('display', 'block'); 899 900 // Set default padding for elements 901 var section_top_inner_elements = $('.fw-main-row-top.fw-content-vertical-align-middle .fw-row:first-child div[class*="fw-col-sm-"]'); 902 section_top_inner_elements.css('paddingTop', '0'); 903 904 // Calculate & identify the elements 905 var header_height = $('.fw-header .fw-header-main').outerHeight(), 906 theme_content_density = Math.abs(parseInt($('.fw-main-row-top.fw-content-vertical-align-middle div[class*="fw-container-"]').css('paddingTop'))), 907 section_top_height = $('.fw-main-row-top.fw-content-vertical-align-middle').outerHeight(), 908 section_top_middle_area_center = (section_top_height - header_height)/ 2, 909 section_top_height_inner_element = $('.fw-main-row-top.fw-content-vertical-align-middle .fw-container-fluid, .fw-main-row-top.fw-content-vertical-align-middle .fw-container').height()/ 2, 910 paddTop = ((header_height + section_top_middle_area_center) - section_top_height_inner_element); 911 912 if($('.fw-main-row-top.fw-content-vertical-align-middle.fw-section-no-padding').length){ 913 section_top_inner_elements.css('paddingTop', paddTop); 914 } 915 else { 916 section_top_inner_elements.css('paddingTop', (paddTop - theme_content_density)); 917 } 918 } 919 920 // Call align middle function 921 var allOverlapClass = $('.fw-content-overlay-sm, .fw-content-overlay-md, .fw-content-overlay-lg, .fw-content-overlay-custom'); 922 if ( $('.fw-absolute-header').length && $('.fw-main-row-custom.fw-main-row-top.fw-content-vertical-align-middle').is(allOverlapClass) && screenRes > 767) { 923 sectionTopOverlay(); 924 $(window).resize(function(){ 925 sectionTopOverlay(); 926 }); 927 } 928 else if( ($('.fw-absolute-header').length > 0) && ($('.fw-main-row-custom.fw-main-row-top.fw-content-vertical-align-middle').length > 0 && screenRes > 767) ){ 929 sectionTopAlignHeaderIsAbsolut(); 930 $(window).resize(function(){ 931 sectionTopAlignHeaderIsAbsolut(); 932 }); 933 } 934 935 // Set for revolution slider for container display block 936 if ($('.rev_slider_wrapper').length > 0) { 937 $('.rev_slider_wrapper').parents('.fw-container-fluid, .fw-row, .fw-container').css('display', 'block'); 938 } 939 jQuery.fn.isOnScreen = function(){ 940 var win = $(window); 941 var viewport = { 942 top : win.scrollTop(), 943 left : win.scrollLeft() 944 }; 945 viewport.right = viewport.left + win.width(); 946 viewport.bottom = viewport.top + win.height(); 947 948 var bounds = this.offset(); 949 bounds.right = bounds.left + this.outerWidth(); 950 bounds.bottom = bounds.top + this.outerHeight(); 951 return (!(viewport.right < bounds.left || viewport.left > bounds.right || viewport.bottom < bounds.top || viewport.top > bounds.bottom)); 952 }; 953 954 // Animate Things (some online tools for responsive test has 750px) 955 if( screenRes > 750 || FwPhpVars.smartphone_animations == 'yes' ){ 956 jQuery(".fw-animated-element").each(function () { 957 var animationElement = $(this), 958 delayAnimation = parseInt(animationElement.data('animation-delay')) / 1000, 959 typeAnimation = animationElement.data('animation-type'); 960 961 if(animationElement.isOnScreen()) { 962 if (!animationElement.hasClass("animated")) { 963 animationElement.addClass("animated").addClass(typeAnimation).trigger('animateIn'); 964 } 965 animationElement.css({ 966 '-webkit-animation-delay': delayAnimation + 's', 967 'animation-delay': delayAnimation + 's' 968 }); 969 } 970 $(window).scroll(function () { 971 var top = animationElement.offset().top, 972 bottom = animationElement.outerHeight() + top, 973 scrollTop = $(this).scrollTop(), 974 top = top - screenHeight; 975 976 if ((scrollTop > top) && (scrollTop < bottom)) { 977 if (!animationElement.hasClass("animated")) { 978 animationElement.addClass("animated").addClass(typeAnimation).trigger('animateIn'); 979 } 980 animationElement.css({
981 '-webkit-animation-delay': delayAnimation + 's', 982 'animation-delay': delayAnimation + 's' 983 }); 984 // Disable animation fill mode the reason that creates problems, 985 // on hover animation some shortcodes and video full screen in Google Chrome 986 var animationEnd = 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend'; 987 jQuery('.animated').one(animationEnd, function() { 988 $(this).addClass('fill-mode-none'); 989 }); 990 } 991 }); 992 }); 993 } 994}); 995 996var $ = jQuery; 997 998/** 999 * Forms 1000 */ 1001jQuery(function ($) { 1002 "use strict"; 1003 var formErrorMessageClass = 'form-error', 1004 formErrorHideEventNamespace = '.form-error-hide', 1005 errorTemplate = '<p class="' + formErrorMessageClass + '" style="color: red;">{message}</p>'; // todo: customize this (add class="" instead of style="") 1006 1007 function showFormError($form, inputName, message) { 1008 var inputSelector = '[name="' + inputName + '"]', 1009 $input = $form.find(inputSelector).last(), 1010 $message = $(errorTemplate.replace('{message}', message)); 1011 1012 if ($input.length) { 1013 $input.parent().after($message); 1014 1015 $form.one('focusout' + formErrorHideEventNamespace, inputSelector, function () { 1016 $message.slideUp(function () { 1017 $(this).remove(); 1018 }); 1019 }); 1020 } else { 1021 // if input not found, show message in form 1022 $form.prepend($message); 1023 } 1024 } 1025 1026 function themeGenerateFlashMessagesHtml(types) { 1027 var html = [], typeHtml = []; 1028 1029 $.each(types, function (type, messages) { 1030 typeHtml = []; 1031 1032 $.each(messages, function (messageId, messageData) { 1033 /*typeHtml.push(messageData.message);*/ 1034 typeHtml.push(messageData); 1035 }); 1036 1037 if (typeHtml.length) { 1038 html.push( 1039 '<ul class="flash-messages-' + type + '">' + 1040 ' <li>' + typeHtml.join('</li><li>') + '</li>' + 1041 '</ul>' 1042 ); 1043 } 1044 }); 1045 1046 if (html.length) { 1047 return html.join(''); 1048 } else { 1049 return '<p>Success</p>'; 1050 } 1051 } 1052 1053 /** 1054 * Display FW_Form errors 1055 */ 1056 do { 1057 if (typeof _fw_form_invalid == 'undefined') { 1058 break; 1059 } 1060 1061 var $form = $('form.fw_form_' + _fw_form_invalid.id).first(); 1062 1063 if (!$form.length) { 1064 console.error('Form not found on the page'); 1065 break; 1066 } 1067 1068 $.each(_fw_form_invalid.errors, function (inputName, message) { 1069 showFormError($form, inputName, message); 1070 }); 1071 } while (false); 1072 1073 /** 1074 * Ajax submit 1075 */ 1076 { 1077 $(document.body).on('submit', 'form[data-fw-ext-forms-type="contact-forms"]', function (e) { 1078 e.preventDefault(); 1079 1080 var $form = $(this); 1081 1082 // todo: show loading 1083 jQuery.ajax({ 1084 type: "POST", 1085 url: FwPhpVars.ajax_url, 1086 data: $(this).serialize(), 1087 dataType: 'json' 1088 }).done(function (r) { 1089 if (r.success) { 1090 // prevent multiple submit 1091 $form.on('submit', function (e) { 1092 e.preventDefault(); 1093 e.stopPropagation(); 1094 }); 1095 1096 $form.html( 1097 themeGenerateFlashMessagesHtml(r.data.flash_messages) 1098 ); 1099 1100 // if form has a redirect page, redirect the form to this URL 1101 var redirect_page = $form.parents('.fw-contact-form').data('redirect-page'); 1102 // if has a success message & a not empty redirect page 1103 if( r.data.flash_messages.success.fw_ext_contact_form_process != undefined && redirect_page != '' ) { 1104 window.location.href = redirect_page; 1105 } 1106 } else { 1107 // hide all current error messages 1108 $form.off(formErrorHideEventNamespace) 1109 .find('.' + formErrorMessageClass).remove(); 1110 1111 // add new error messages 1112 $.each(r.data.errors, function (inputName, message) { 1113 showFormError($form, inputName, message); 1114 }); 1115 } 1116 }).fail(function () { 1117 // show fail error message 1118 $form.html(FwPhpVars.fail_form_error); 1119 // todo: show server error 1120 }); 1121 }); 1122 } 1123}); 1124 1125/** 1126 * Radiobox for woocommerce 1127 */ 1128$(document).on("ajaxComplete", function () { 1129 jQuery(".input-radio, #terms").customInput(); 1130}); 1131 1132// Window load function 1133$(window).load(function () { 1134 "use strict"; 1135 1136 var $ = jQuery, 1137 screenRes = $(window).width(); 1138 1139 // vertical align middle 1140 function fnResize() { 1141 $('.fw-content-vertical-align-middle').each(function () { 1142 var $this = $(this), 1143 heightContainerParent = $this.find('.fw-container-fluid, .fw-container').outerHeight(), 1144 heightParent = $this.outerHeight(), 1145 numberColumn = 0; 1146 numberColumn = parseInt($this.find('.fw-row').length); 1147 if (numberColumn < 2) { 1148 $this.find('[id^="column-"]').each(function () { 1149 var $thisColum = $(this); 1150 var heightColum = $thisColum.outerHeight(), 1151 heightContainer = $this.find('.fw-container-fluid, .fw-container').height(); 1152 $thisColum.css({
1153 marginTop: heightContainer / 2 - heightColum / 2 1154 }); 1155 }); 1156 $this.css({ 1157 paddingTop: heightParent / 2 - heightContainerParent / 2 1158 }).addClass("fw-middle-align"); 1159 } else { 1160 $('.fw-content-vertical-align-middle').addClass("fw-middle-align"); 1161 } 1162 }); 1163 } 1164 1165 if(screenRes > 767 ){ 1166 fnResize(); 1167 } 1168 1169 jQuery(window).resize(function () { 1170 var screenRes = jQuery(window).width(); 1171 if(screenRes > 767 ){ 1172 fnResize(); 1173 } 1174 }); 1175}); 1176 1177// start carousel for portfolio filter 1178function start_carousel_portfolio_filter() { 1179 var portfolio_filter = jQuery('.portfolio_filter'); 1180 if (portfolio_filter.length > 0) { 1181 portfolio_filter.each(function () { 1182 var filter_id = jQuery(this).attr('id'); 1183 jQuery('#' + filter_id).carouFredSel({ 1184 swipe: { 1185 onTouch: true 1186 }, 1187 prev: '#' + filter_id + '-prev', 1188 next: '#' + filter_id + '-next', 1189 items: { 1190 visible: 'variable' 1191 }, 1192 auto: { 1193 play: false 1194 }, 1195 infinite: true, 1196 scroll: { 1197 items: 1, 1198 duration: 600, 1199 easing: 'swing' 1200 } 1201 }); 1202 }); 1203 } 1204} 1205 1206jQuery(window).resize(function () { 1207 start_carousel_portfolio_filter(); 1208}); 1209 1210function start_prettyphoto() { 1211 if ($('a').is('[data-rel]')) { 1212 $("a[rel^='prettyPhoto'], a[data-rel^='prettyPhoto']").prettyPhoto({ 1213 social_tools: false, 1214 deeplinking: false, 1215 theme: 'dark_square', 1216 horizontal_padding: 60, 1217 show_title: false, 1218 default_width: 800, 1219 default_height: 400, 1220 allow_resize: true, 1221 overlay_gallery: false, 1222 markup: '<div class="pp_pic_holder"> \ 1223 <div class="ppt"> </div> \ 1224 <div class="pp_top"> \ 1225 <div class="pp_left"></div> \ 1226 <div class="pp_middle"></div> \ 1227 <div class="pp_right"></div> \ 1228 </div> \ 1229 <div class="pp_content_container"> \ 1230 <div class="pp_left"> \ 1231 <div class="pp_right"> \ 1232 <div class="pp_content"> \ 1233 <div class="pp_loaderIcon"></div> \ 1234 <div class="pp_fade"> \ 1235 <a href="#" class="pp_expand" title="Expand the image">Expand</a> \ 1236 <div class="pp_hoverContainer"> \ 1237 <a class="pp_next" href="#">' + FwPhpVars.next + '</a> \ 1238 <a class="pp_previous" href="#">' + FwPhpVars.previous + '</a> \ 1239 </div> \ 1240 <div id="pp_full_res"></div> \ 1241 <div class="pp_details"> \ 1242 <div class="pp_nav"> \ 1243 <a href="#" class="pp_arrow_previous">' + FwPhpVars.previous + '</a> \ 1244 <p class="currentTextHolder">0/0</p> \ 1245 <a href="#" class="pp_arrow_next">' + FwPhpVars.next + '</a> \ 1246 </div> \ 1247 <p class="pp_description"></p> \ 1248 <div class="pp_social">{pp_social}</div> \ 1249 <a class="pp_close" href="#">Close</a> \ 1250 </div> \ 1251 </div> \ 1252 </div> \ 1253 </div> \ 1254 </div> \ 1255 </div> \ 1256 <div class="pp_bottom"> \ 1257 <div class="pp_left"></div> \ 1258 <div class="pp_middle"></div> \ 1259 <div class="pp_right"></div> \ 1260 </div> \ 1261 </div> \ 1262 <div class="pp_overlay"></div>', 1263 changepicturecallback: function () { 1264 setupSwipe(); 1265 var $holder = jQuery('.pp_nav .currentTextHolder'), 1266 $closeButton = jQuery('.pp_close'), 1267 splitted = $holder.text().split('/'); 1268 $closeButton.addClass('fa fa-times'); 1269 1270 $holder.html(splitted.join('<span class="pp_text_devider">/</span>')); 1271 $closeButton.remove(); 1272 $('.pp_pic_holder').prepend($closeButton); 1273 1274 $closeButton.click(function () { 1275 $('.pp_overlay, .pp_pic_holder').fadeOut(300, function () { 1276 $(this).remove(); 1277 }); 1278 return false 1279 }); 1280 } 1281 }); 1282 var setupSwipe = function(){ 1283 $(".pp_pic_holder").swipe({ 1284 swipeLeft: function () { 1285 $.prettyPhoto.changePage('next'); 1286 }, 1287 swipeRight: function () { 1288 $.prettyPhoto.changePage('previous'); 1289 }, 1290 min_move_x: 20, 1291 min_move_y: 20, 1292 preventDefaultEvents: true 1293 }); 1294 }; 1295 } 1296} 1297
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.