1 function mom_initiate_geolocation() { 2 navigator.geolocation.getCurrentPosition(mom_handle_geolocation_query); 3 } 4 5 function mom_handle_geolocation_query(position){ 6 //alert('Lat: ' + position.coords.latitude + ' ' + 'Lon: ' + position.coords.longitude); 7 8 jQuery.ajax({ 9 type: "post", 10 url: momAjaxL.url, 11 dataType: 'html', 12 data: "action=mom_ajaxweather&nonce="+momAjaxL.nonce+"&lat="+position.coords.latitude+"&lon="+position.coords.longitude, 13 success: function(data){ 14 if (data !== '') { 15 jQuery('.weather-widget').replaceWith(data).hide().fadeIn(); 16 17 jQuery('.w-item-wrap').each( function() { 18 var acc = jQuery(this); 19 acc.find('.w-item-open').addClass('active'); 20 acc.find('.w-item-open').next('.w-item-content').show(); 21 acc.find('.w-item-close').removeClass('active'); 22 acc.find('.w-item-close').next('.w-item-content').hide(); 23 24 acc.find('.w-item-title').on('click',function() { 25 jQuery(this).toggleClass('active'); 26 jQuery(this).next('.w-item-content').slideToggle(); 27 }); 28 }); 29 } 30 31 } 32 33 }); 34 } 35 36jQuery(document).ready(function($) { 37 "use strict"; 38 // remove empty p 39 $('p') 40 .filter(function() { 41 return $.trim($(this).text()) === '' && $(this).children().length == 0 42 }) 43 .remove(); 44 45 //images 46 if (!( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) )) { 47 $('body.fade-imgs-in-appear .main-container img, body.fade-imgs-in-appear .sidebar img, body.fade-imgs-in-appear .secondary-sidebar img, body.fade-imgs-in-appear #footer img').addClass('disappear'); 48 $('body.fade-imgs-in-appear .main-container img, body.fade-imgs-in-appear .sidebar img, body.fade-imgs-in-appear .secondary-sidebar img, body.fade-imgs-in-appear #footer img').one('inview', function(e, isInView, visiblePartX, visiblePartY) { 49 if (visiblePartY == 'top') { 50 $(this).addClass('appear'); 51 } else if (visiblePartY == 'bottom') { 52 $(this).addClass('appear'); 53 } else { 54 $(this).addClass('appear'); 55 56 } 57 58 59 }); 60 } 61 62 // automaitc weather since 2.2 63 if($('body').hasClass('automatic_weather')) { 64 if($.cookie('lat') == null && $.cookie('lon') == null) { 65 mom_initiate_geolocation(); 66 } 67 } 68 69// widgetized sidebars 70$('.wpb_widgetised_column').each(function() { 71 if ($(this).parents().hasClass('sidebar') || $(this).parents().hasClass('secondary-sidebar')) { 72 $(this).removeClass('sidebar'); 73 } 74}); 75 76//mom cat links 77$('.mom_cat_link').each(function() { 78 var t = $(this); 79 var link_color = t.find('a').css('color'); 80 var bull_color = t.find('.mom_cats_color_bull').css('background-color'); 81 t.hover(function() { 82 $(this).find('a').css('color', $(this).data('color')); 83 $(this).find('.mom_cats_color_bull').css('background-color', $(this).data('color')); 84 }, function() { 85 $(this).find('a').css('color', link_color); 86 $(this).find('.mom_cats_color_bull').css('background-color', bull_color); 87 }); 88}); 89 // banners 90 $('a.tob_banner_close').on('click', function(e) { 91 $('.top_banner').slideUp(400); 92 e.preventDefault(); 93 }); 94 95 var tob_auto_close = $('.top_banner').data('timeout'); 96 97 if (tob_auto_close !== '') { 98 setTimeout(function() { 99 $('.top_banner').slideUp(); 100 }, tob_auto_close*1000); 101 } 102 103 $('a.unav_banner_close').on('click', function(e) { 104 $('.unav_banner').slideUp(400); 105 e.preventDefault(); 106 }); 107 108 var unav_auto_close = $('.unav_banner').data('timeout'); 109 110 if (unav_auto_close !== '') { 111 setTimeout(function() { 112 $('.unav_banner').slideUp(); 113 }, unav_auto_close*1000); 114 } 115// smooth scroll 116if ($('body').hasClass('smooth_scroll_enable')) { 117 $("html").niceScroll({ 118 scrollspeed: 40, 119 background: '#f9f9f9', 120 autohidemode: false, 121 railpadding: { top: 1, right: 3, left: 3, bottom: 1 }, 122 cursorwidth: "8px", 123 cursorcolor: "#c3c3c3", 124 cursorborder: "none",
125 cursorborderradius: "4px", 126 zindex: 100000, 127 }); 128} 129 130 //place holder 131 $('input:not(#tb-search)').each(function() { 132 $(this).data('holder', $(this).attr('placeholder')); 133 134 $('input:not(#tb-search)').focusin(function() { 135 $(this).attr('placeholder', ''); 136 }); 137 $('input:not(#tb-search)').focusout(function() { 138 $(this).attr('placeholder', $(this).data('holder')); 139 }); 140 }); 141 $('textarea').each(function() { 142 $(this).data('holder', $(this).attr('placeholder')); 143 144 $(this).focusin(function() { 145 $(this).attr('placeholder', ''); 146 }); 147 $(this).focusout(function() { 148 $(this).attr('placeholder', $(this).data('holder')); 149 }); 150 151 }); 152 153 //HIDPI Images 154 var hidpi = window.devicePixelRatio > 1 ? true : false; 155 if (hidpi) { 156 // Replace img src with data-hidpi 157 $('img[data-hidpi]').each(function() { 158 // If width x height hasn't been set, fill it in 159 if ($(this).parents('.tab-content').length === 0) { 160 /* 161 if ($(this).attr('width') === undefined) { 162 $(this).attr('width', $(this).width()); 163 } 164 if ($(this).attr('height') === undefined) { 165 $(this).attr('height', $(this).height()); 166 } 167 */ 168 } 169 //$(this).attr('src', $(this).data('hidpi')); 170 }); 171 } 172 //feature slider 173 var fsw = $('.def-slider').width(); 174 if (fsw > 650) { 175 $('.def-slider-wrap .def-slider-item a img').each(function() { 176 $(this).attr('src', $(this).data('hidpi')); 177 }); 178 } 179if (jQuery(".alert-bar").length) { 180 $('.alert-bar').slideDown(); 181 182 setTimeout(function() { 183 $('.alert-bar').slideUp().remove(); 184 }, 5000); 185} 186 //tabbed widget 187 if (jQuery(".widget_momizattabber").length) { 188 jQuery(".widget_momizattabber").each(function() { 189 var ul = jQuery(this).find(".main_tabs ul.widget-tabbed-header"); 190 191 jQuery(this).find(".widget-tab").each(function() { 192 jQuery(this).find('a.mom-tw-title').wrap('<li></li>').parent().detach().appendTo(ul); 193 }); 194 }); 195 } 196 197 //widgets 198 $('.widget select, select#notifications-sort-order-list, select#members-friends, select#groups-sort-by, #members-order-by, #message-type-select, #activity-filter-by').wrap('<div class="mom-select"></div>') 199 // search 200 $('.top-search').click(function(e) { 201 $(this).toggleClass('active'); 202 //$(this).next('.search-wrap').fadeToggle(250); 203 $(this).find('.search-dropdown').toggleClass('sw-show'); 204 $(this).find('.search-dropdown').find('input').focus(); 205 e.stopPropagation(); 206 207 }); 208 $('.search-dropdown').click(function(e) { 209 e.stopPropagation(); 210 }); 211 212 $('body').click(function(e) { 213 $('.top-search').removeClass('active'); 214 $('.search-dropdown').removeClass('sw-show'); 215 }); 216 217 218 //Mobile Menus 219 if ($('.top_menu_handle').length) { 220 $('.top_menu_handle').toggle( function () { 221 $(this).next('.mobile_top_nav').show(); 222 $(this).addClass('tmh_close'); 223 }, function () { 224 $(this).next('.mobile_top_nav').hide(); 225 $(this).removeClass('tmh_close'); 226 }); 227 } 228 //br 229 $('.brmenu').click(function(e) { 230 $(this).toggleClass('active'); 231 //$(this).next('.search-wrap').fadeToggle(250); 232 $(this).next('.br-right').toggleClass('sw-show'); 233 e.stopPropagation(); 234 235 }); 236 $('.br-right').click(function(e) { 237 e.stopPropagation(); 238 }); 239 240 241 $('body').click(function(e) { 242 $('.brmenu').removeClass('active'); 243 $('.br-right').removeClass('sw-show'); 244 }); 245 246 //Login box 247 $('.brmenu .nav-button').click(function(e) { 248 $(this).toggleClass('active'); 249 //$(this).next('.search-wrap').fadeToggle(250);
250 $(this).next('.nb-inner-wrap').toggleClass('sw-show'); 251 e.stopPropagation(); 252 253 }); 254 $('.nb-inner-wrap').click(function(e) { 255 e.stopPropagation(); 256 }); 257 258 $('body').click(function(e) { 259 $('.brmenu .nav-button').removeClass('active'); 260 $('.nb-inner-wrap').removeClass('sw-show'); 261 }); 262 263 //Sticky navigation 264 if ( $(window).width() > 1000 ) { 265 if ($('body').hasClass('sticky_navigation_on')) { 266 var aboveHeight = $('#header-wrapper').outerHeight(); 267 var sl = $('#navigation').data('sticky_logo'); 268 var slw = $('#navigation').data('sticky_logo_width'); 269 $(window).scroll(function() { 270 //if scrolled down more than the headerÃs height 271 if ($(window).scrollTop() > aboveHeight) { 272 // if yes, add Ãfixedà class to the <nav> 273 // add padding top to the #content 274 if ( $('#wpadminbar').length ) { 275 $('#navigation').addClass('sticky-nav').css('top', '28px').next().css('padding-top', '52px'); 276 } else { 277 $('#navigation').addClass('sticky-nav').css('top', '0').next().css('padding-top', '52px'); 278 } 279 if (sl !== '') { 280 $('.sticky_logo').show(); 281 $('#navigation > .inner').stop().animate({ 282 'padding-left': (slw + 15) + 'px', 283 }, 300); 284 $('.rtl #navigation > .inner').stop().animate({ 285 'padding-right': (slw + 15) + 'px', 286 }, 300); 287 } 288 } else { 289 290 // when scroll up or less than aboveHeight, 291 $('#navigation').removeClass('sticky-nav').css('top', 0).next().css('padding-top', '0'); 292 if (sl !== '') { 293 $('.sticky_logo').hide(); 294 $('#navigation > .inner').stop().animate({ 295 'padding-left': 0, 296 }); 297 $('.rtl #navigation > .inner').stop().animate({ 298 'padding-right': 0, 299 }); 300 } 301 } 302 }); 303 } 304 } 305 306 //tabbed sort 307 308 $('.feature-tabbed').each(function() { 309 var t = $(this); 310 t.find('.tabbed-sort li').click(function() { 311 var layout = $(this).attr('class'); 312 $('.tabbed-sort li').removeClass('active'); 313 $(this).addClass('active'); 314 if (layout.indexOf("list") >= 0) { 315 t.find('.f-tabbed-body ul').removeClass('f-tabbed-grid'); 316 t.find('.f-tabbed-body ul').addClass('f-tabbed-list'); 317 } else { 318 t.find('.f-tabbed-body ul').addClass('f-tabbed-grid'); 319 t.find('.f-tabbed-body ul').removeClass('f-tabbed-list'); 320 } 321 return false; 322 323 }); 324 }); 325 326 //widget weather 327 $('.w-item-wrap').each( function() { 328 var acc = $(this); 329 acc.find('.w-item-open').addClass('active'); 330 acc.find('.w-item-open').next('.w-item-content').show(); 331 acc.find('.w-item-close').removeClass('active'); 332 acc.find('.w-item-close').next('.w-item-content').hide(); 333 334 acc.find('.w-item-title').on('click',function() { 335 $(this).toggleClass('active'); 336 $(this).next('.w-item-content').slideToggle(); 337 }); 338 }); 339 //category count 340 $('.sidebar li.cat-item, .sidebar .widget_archive li').each(function() { 341 var $contents = $(this).contents(); 342 if ($contents.length > 1) { 343 $contents.eq(1).wrap('<div class="cat_num"></div>'); 344 345 $contents.eq(1).each(function() {}); 346 } 347 }).contents(); 348 $('.sidebar li.cat-item .cat_num, .sidebar .widget_archive li .cat_num').each(function () { 349 $(this).html($(this).text().substring(2)); 350 $(this).html( $(this).text().replace(/\)/gi, "") ); 351 }); 352 353 if ($('.sidebar li.cat-item').length) { 354 $('.sidebar li.cat-item .cat_num').each( function() { 355 if ($(this).is(':empty')) { 356 $(this).hide(); 357 } 358 359 }); 360 } 361 362 $('.secondary-sidebar .widget_archive li, .secondary-sidebar .widget_categories li').html( function(idx, html) { 363 return html.replace(/(\d+)/g, ' $1 '); 364 }); 365 $(".secondary-sidebar .widget_archive li a, .secondary-sidebar .widget_categories li a").each( function() { 366 this.href = this.href.replace(/\s/g,""); 367 }); 368 369 //category sort 370 $('.cat-sort li').click(function() { 371 var layout = $(this).attr('class'); 372 $('.cat-sort li').removeClass('active') 373 $(this).addClass('active'); 374 if (layout.indexOf("list") >= 0) { 375 $('.cat-body ul').removeClass('cat-grid'); 376 $('.cat-body ul').addClass('cat-list'); 377 } else { 378 $('.cat-body ul').addClass('cat-grid'); 379 $('.cat-body ul').removeClass('cat-list'); 380 } 381 return false;
382 383 }); 384 $(window).resize(function() { 385 if ($(window).width() < 568) { 386 $('.cat-body ul').removeClass('cat-grid'); 387 $('.cat-body ul').addClass('cat-list'); 388 } 389 }); 390 391 if ( $(window).width() < 568) { 392 $('.cat-body ul').removeClass('cat-grid'); 393 $('.cat-body ul').addClass('cat-list'); 394 } 395 396 // Post share 397 if ($('.mom-share-buttons').length) { 398 $('.mom-share-buttons').data('height', $('.mom-share-buttons').css('height')); 399 var curHeight = $('.mom-share-buttons').height(); 400 $('.mom-share-buttons').css('height', 'auto'); 401 var autoHeight = $('.mom-share-buttons').height(); 402 $('.mom-share-buttons').css('height', curHeight); 403 $('.mom-share-post .sh_arrow').toggle(function () { 404 $('.mom-share-buttons').stop().animate({ 405 height: autoHeight 406 }, 300); 407 $(this).find('i').removeClass(); 408 $(this).find('i').addClass('fa-icon-double-angle-up'); 409 }, function () { 410 $('.mom-share-buttons').stop().animate({ 411 height: $('.mom-share-buttons').data('height') 412 }, 300); 413 $(this).find('i').removeClass(); 414 $(this).find('i').addClass('fa-icon-double-angle-down'); 415 }); 416 } 417 418 419 // expand post image 420 var imgH = $('.entry-content-data .post-thumbnail').outerHeight() + 20; 421 var pi_w = $('.entry-content-data .post-thumbnail').parent().parent().width() - 12; 422 $('.entry-content-data.has_f_image').css('padding-top', imgH + 'px'); 423 $('.entry-content-data .post-thumbnail:not(.pt-zoom)').click(function() { 424 if (!$(this).hasClass('active') ) { 425 $(this).animate({ 426 width: pi_w + 'px', 427 left: 0, 428 }); 429 $(this).addClass('active'); 430 $(this).find('desc').fadeOut(); 431 } else { 432 $(this).removeClass('active'); 433 $(this).find('desc').fadeIn(); 434 $(this).animate({ 435 width: '152px', 436 }); 437 } 438 }); 439 440 //widget tabs 441 if ($("ul.widget-tabbed-header").length) {
442 $("ul.widget-tabbed-header:not(.mom-bp-tabbed-widgets)").momtabs("div.widget-tabbed-body > .widget-tab", { 443 effect: 'fade' 444 }); 445 } 446 // news box subcategories 447 $('.nb-tabbed-head .more-categories > a').click(function(e) { 448 var t = $(this); 449 if (t.hasClass('active')) { 450 t.removeClass('active'); 451 t.parent().find('ul').hide(); 452 } else { 453 t.addClass('active'); 454 t.parent().find('ul').show(); 455 } 456 e.preventDefault(); 457 e.stopPropagation(); 458 }); 459 460 $('body').click(function(e) { 461 $('.nb-tabbed-head .more-categories > a').removeClass('active'); 462 $('.nb-tabbed-head .more-categories ul').hide(); 463 464 }); 465 // get current time 466 var now = new Date(); 467 $('.t-w-title .weather-date span').text(now.getHours() + ':' + now.getMinutes()); 468 469 // units form 470 if ($('#units-form').length) { 471 $('#units-form input[type="radio"]').click(function() { 472 $('#units-form').submit(); 473 }); 474 } 475 476 // Avanced search form Validate 477 $('#advanced-search [type="submit"]').click(function(e) { 478 var s = $(this).parent().find('input[name="s"]'); 479 if (s.val() === '' ) { 480 e.preventDefault() 481 s.addClass('invalid'); 482 s.attr('placeholder', s.data('nokeyword')); 483 } 484 }); 485 486 $('.media-sort-form #media-sort').change(function() { 487 $('#advanced-search').submit(); 488 }); 489 490 //Fix ajax search 491 $( ".ajax-search-results h4" ).prev().css( "border-bottom", "none" ); 492 493 //social icons 494 if ($('ul.top-social-icon').length) { 495 $('ul.top-social-icon li').each(function () { 496 var dataHover = $(this).attr('data-bghover'); 497 if (typeof dataHover !== 'undefined' && dataHover !== false) { 498 var origBg = $(this).css('background'); 499 var hoverBg = $(this).data('bghover'); 500 $(this).hover(function() { 501 $(this).css('background', hoverBg) 502 }, function() { 503 $(this).css('background', origBg) 504 }); 505 } 506 }); 507 } 508 509 //back to top 510 var offset = 220; 511 var duration = 500; 512 jQuery(window).scroll(function() { 513 if (jQuery(this).scrollTop() > offset) { 514 jQuery('.toup').css({ 515 opacity: "1", 516 display: "block", 517 }); 518 } else { 519 jQuery('.toup').css('opacity', '0'); 520 } 521 }); 522 523 jQuery('.toup').click(function(event) { 524 event.preventDefault(); 525 jQuery('html, body').animate({ 526 scrollTop: 0 527 }, duration); 528 return false; 529 }) 530 531 //Category Menu 532 $('.mom-megamenu ul.sub-menu li').mouseenter(function() { 533 var id = $(this).attr('id'); 534 var id = id.split('-'); 535 //console.log(id[2]); 536 $(this).parent().find('li').removeClass('active'); 537 $(this).addClass('active'); 538 $(this).parent().next('.sub-mom-megamenu, .sub-mom-megamenu2').find('.mom-cat-latest').hide(); 539 $(this).parent().next('.sub-mom-megamenu, .sub-mom-megamenu2').find('#mom-mega-cat-' + id[2]).show(); 540 }); 541 542 //Submenu auto align 543 $('ul.main-menu > li').each(function(e) { 544 var t = $(this), 545 submenu = t.find('.cats-mega-wrap'); 546 if ( submenu.length > 0 ) { 547 var offset = submenu.offset(), 548 w = submenu.width(); 549 if ( offset.left + w > $(window).width() ) { 550 t.addClass('sub-menu-left'); 551 } else { 552 t.removeClass('sub-menu-left'); 553 } 554 } 555 }); 556 557 //post share 558 $('.mom-share-buttons a:not(.share-email)').click(function(e) { 559 e.preventDefault(); 560 }) 561 562 // scroll to links 563 $('.story-highlights ul li a').click(function() { 564 $('html, body').animate({ 565 scrollTop: $('[name="' + $.attr(this, 'href').substr(1) + '"]').offset().top - 18 566 }, 800); 567 return false; 568 }); 569 570 571 // Footer Mega Menu 572 var fm_count = $('.footer_mega_menu > li').length; 573 var item_width = 100 / fm_count; 574 $('.footer_mega_menu > li').css('width', item_width + '%'); 575 //alert(fm_count); 576 577 //fix twitter widget 578 $('.twiter-list ul.twiter-buttons li a').click( function(e) { 579 e.preventDefault(); 580 }); 581 582 //Ads 583 if ($('.mca-fixed').length) { 584 var mca_top = $('.mca-fixed').offset().top; 585 var mca = $('.mca-fixed'); 586 $(window).scroll(function() { 587 if ($(window).scrollTop() > mca_top) { 588 if ( $('#wpadminbar').length ) { 589 mca.css({ 590 top: '28px', 591 position: 'fixed' 592 }); 593 mca.addClass('mca_touch_top'); 594 } else { 595 mca.css({ 596 top: '0', 597 position: 'fixed' 598 }); 599 mca.addClass('mca_touch_top'); 600 } 601 } else { 602 mca.css({ 603 top: 'auto', 604 position: 'absolute' 605 }); 606 mca.removeClass('mca_touch_top'); 607 } 608 }); 609 } 610 611 //$('.secondary-sidebar').stick_in_parent() 612 613 //Fix placeholder in IE9 614 var isInputSupported = 'placeholder' in document.createElement('input'); 615 var isTextareaSupported = 'placeholder' in document.createElement('textarea'); 616 if (!isInputSupported || !isTextareaSupported) { 617 $('[placeholder]').focus(function () { 618 var input = $(this); 619 if (input.val() == input.attr('placeholder') && input.data('placeholder')) { 620 input.val(''); 621 input.removeClass('placeholder'); 622 } 623 }).blur(function () { 624 var input = $(this); 625 if (input.val() == '') { 626 input.addClass('placeholder'); 627 input.val(input.attr('placeholder')); 628 input.data('placeholder', true); 629 } else { 630 input.data('placeholder', false); 631 } 632 }).blur().parents('form').submit(function () { 633 $(this).find('[placeholder]').each(function () { 634 var input = $(this); 635 if (input.val() == input.attr('placeholder') && input.data('placeholder')) { 636 input.val(''); 637 } 638 }) 639 }); 640 } 641 /* ========================================================================== 642 * braking 643 ========================================================================== */ 644 if ($('.breaking-cont .webticker').length) { 645 $('.breaking-cont .webticker').each( function() {
646 var brtype = $(this).data('br_type'); 647 var brspeed = $(this).data('br_speed'); 648 var brbspeed = $(this).data('br_bspeed'); 649 var brduration = $(this).data('br_duration'); 650 if (brtype == 'default') { 651 $('body:not(.rtl) .breaking-cont .webticker').liScroll({travelocity: brspeed}); 652 $('body.rtl .breaking-cont .webticker').liScrollRight({travelocity: brspeed}); 653 /* 654 $('body:not(.rtl) .breaking-cont .webticker').marquee({ 655 pauseOnHover: true, 656 duration: brspeed, 657 duplicated: true 658 }); 659 660 $('body.rtl .breaking-cont .webticker').marquee({ 661 pauseOnHover: true, 662 duration: brspeed, 663 direction: 'right', 664 }); 665 */ 666 } else if(brtype == 'right') { 667 $('.breaking-cont .webticker').newsTicker({ 668 row_height: 39, 669 max_rows: 1, 670 speed: brbspeed, 671 direction: 'up', 672 duration: brduration, 673 autostart: 1, 674 pauseOnHover: 1 675 }); 676 } else if(brtype == 'fade') { 677 $('.breaking-cont .webticker').owlCarousel({ 678 items: 1, 679 loop: true, 680 mouseDrag: false, 681 autoplay: true, 682 autoplayTimeout: brduration, 683 autoplayHoverPause: true, 684 animateOut: 'fadeOut' 685 686 }); 687 } 688 }); 689 } 690 691 /* ========================================================================== 692 * Google maps 693 ========================================================================== */ 694 if ($('.mom_google_map').length) { 695 $('.mom_google_map').each( function() { 696 var id = $(this).attr('id'); 697 var lat = $(this).data('lat'); 698 var longi = $(this).data('long'); 699 var color = $(this).data('color'); 700 var zoom = $(this).data('zoom'); 701 var pan = $(this).data('pan'); 702 var controls = $(this).data('controls'); 703 var marker_icon = $(this).data('marker_icon'); 704 var marker_title = $(this).data('marker_title'); 705 var marker_animation = $(this).data('marker_animation'); 706 var sat = $(this).data('sat'); 707 var info = $(this).data('marker_info'); 708 var ani = ''; 709 if (marker_animation == 'BOUNCE') { 710 ani = google.maps.Animation.BOUNCE; 711 } else if(marker_animation == 'DROP') { 712 ani = google.maps.Animation.BOUNCE; 713 } 714 715 function maps_init() { 716 var styles = { 717 'mommap': [{ 718 "featureType": "administrative", 719 "stylers": [ 720 { "visibility": "on" } 721 ] 722 }, 723 { 724 "featureType": "road", 725 "stylers": [ 726 { "visibility": "on" }, 727 { "hue": color } 728 ] 729 }, 730 { 731 "elementType": "geometry", 732 "stylers": [ 733 { "visibility": "simplified" }, 734 { "hue": color }, 735 {"weight": 1.1} 736 ] 737 }, 738 { 739 "stylers": [ 740 { "visibility": "on" }, 741 { "hue": color }, 742 { "saturation": sat } 743 ] 744 } 745 ]}; 746 747 var coord = new google.maps.LatLng(lat, longi); 748 var options = { 749 zoom: zoom, 750 center: coord, 751 //mapTypeId: google.maps.MapTypeId.ROADMAP, 752 disableDefaultUI: true, 753 mapTypeId: 'mommap', 754 draggable: true, 755 zoomControl: controls, 756 panControl: pan, 757 mapTypeControl: controls, 758 scaleControl: controls, 759 streetViewControl: controls, 760 overviewMapControl: controls, 761 scrollwheel: false, 762 disableDoubleClickZoom: true 763 } 764 var map = new google.maps.Map(document.getElementById(id), options); 765 var styledMapType = new google.maps.StyledMapType(styles['mommap'], {name: 'mommap'}); 766 map.mapTypes.set('mommap', styledMapType); 767 var contentString = '<div class"map-info-window"><p>'+info+'</p></div>'; 768 var infowindow = new google.maps.InfoWindow({ 769 content: contentString 770 }); 771 772 var marker = new google.maps.Marker({ 773 position: coord, 774 map: map, 775 title:marker_title, 776 icon: marker_icon, 777 animation: ani 778 }); 779 if (info !== '') { 780 google.maps.event.addListener(marker, 'click', function() { 781 infowindow.open(map,marker); 782 }); 783 } 784 785 } 786 google.maps.event.addDomListener(window, 'load', maps_init); 787 google.maps.event.addDomListener(window, 'resize', maps_init); 788 789 790 }); 791 } 792 /* ========================================================================== 793 * Homepage blocks 794 ========================================================================== */ 795 if ($('.def-slider-wrap').length) { 796 $('.def-slider-wrap').each( function() { 797 var rtl = $(this).data('srtl'); 798 var animate_out = $(this).data('animate_out'); 799 var animate_in = $(this).data('animate_in'); 800 var autoplay = $(this).data('autoplay'); 801 var timeout = $(this).data('timeout'); 802 var bull_event = $(this).data('bullets_event'); 803 $(this).owlCarousel({ 804 animateOut: animate_out, 805 animateIn: animate_in,
806 autoplay: autoplay, 807 autoplayTimeout: timeout, 808 autoplayHoverPause:false, 809 autoHeight:true, 810 rtl: rtl, 811 loop: true, 812 items:1, 813 nav: true, 814 navText: ['<span class="enotype-icon-arrow-left7"></span>', 815 '<span class="enotype-icon-uniE6D8"></span>' 816 ], 817 smartSpeed:1000, 818 lazyLoad : true, 819 dotData:true, 820 }); 821 822 }); 823 } 824 //Cat slider 825 $('.cat-slider-wrap').show(); 826 if ($('.feature-cat-slider').length) { 827 $('.cat-slider-wrap').each( function() { 828 var cat_timeout = $(this).data('cat_timeout'); 829 $(this).cycle({ 830 fx: 'fade', 831 pager: '.cat-slider-nav ul', 832 next: '.fc_next', 833 prev: '.fc_prev', 834 timeout: cat_timeout, 835 pagerAnchorBuilder: function(idx, slide) { 836 // return selector string for existing anchor 837 return '.cat-slider-nav ul li:eq(' + idx + ')'; 838 } 839 }); 840 841 $(".cat-slider-nav").niceScroll({ 842 horizrailenabled: false, 843 }); 844 }); 845 } 846 847 //scroller 848 if ($('.scroller-wrap-1').length) { 849 $('.scroller-wrap-1').each( function() { 850 var scauto = $(this).data('sc-auto'); 851 var scautotime = $(this).data('sc-autotime'); 852 var scspeed = $(this).data('sc-speed'); 853 var scrtl = $(this).data('sc-rtl'); 854 var items = $(this).data('items'); 855 var r1 = 3; 856 var r2 = 2; 857 if (items < r1) { 858 r1 = items; 859 } 860 if (items < r2) { 861 r2 = items; 862 } 863 864 $(this).owlCarousel({ 865 autoplay: scauto, 866 autoplayTimeout: scautotime, 867 slideSpeed : scspeed, 868 rtl: scrtl, 869 autoplayHoverPause: true, 870 items : items, 871 lazyLoad : true, 872 navigation : true, 873 margin: 1, 874 nav:true, 875 responsiveClass:true, 876 responsive:{ 877 1000:{ 878 items:items 879 }, 880 881 671:{ 882 items:r1 883 }, 884 885 480:{ 886 items:r2 887 }, 888 889 320:{ 890 items:1 891 } 892 } 893 }); 894 895 }); 896 } 897 898 //scroller2 899 if ($('.scroller-wrap-2').length) { 900 $('.scroller-wrap-2').each( function() { 901 var sc2auto = $(this).data('sc2-auto'); 902 var sc2autotime = $(this).data('sc2-autotime'); 903 var sc2speed = $(this).data('sc2-speed'); 904 var sc2rtl = $(this).data('sc2-rtl'); 905 var items = $(this).data('items'); 906 var r1 = 3; 907 var r2 = 2; 908 if (items < r1) { 909 r1 = items; 910 } 911 if (items < r2) { 912 r2 = items; 913 } 914 $(this).owlCarousel({ 915 autoplay: sc2auto, 916 autoplayTimeout: sc2autotime, 917 slideSpeed : sc2speed, 918 rtl: sc2rtl, 919 autoplayHoverPause: true, 920 items : items, 921 lazyLoad : true, 922 //navigation : true, 923 //loop:true, 924 margin: 0, 925 nav:true, 926 responsiveClass:true, 927 responsive:{ 928 1157: { 929 items: items 930 }, 931 1156:{ 932 items:items 933 }, 934 935 671:{ 936 items:r1 937 }, 938 939 480:{ 940 items:r2 941 }, 942 943 320:{ 944 items:1 945 } 946 } 947 }); 948 949 }); 950 } 951 952// double tab on navigation 953if(( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) )) { 954 $('#navigation .main-menu > li.menu-item-has-children').doubleTapToGo(); 955} 956 957 958 // Responsive menus 959 $('.top-menu-holder').click(function() { 960 $('.top-menu').slideToggle(); 961 $(this).toggleClass('active'); 962 }); 963 $( window ).resize(function() { 964 if($( window ).width() >= 1000) { 965 $(".top-menu").show(); 966 } 967 else { 968 $(".top-menu").hide(); 969 } 970}); 971 972 $('.device-menu-holder').click(function() { 973 console.log('clicked'); 974 if ($(this).hasClass('active')) { 975 $('.device-menu li').each(function() { 976 if ($(this).find('.mom_mega_wrap').length !== 0) {} else { 977 $(this).find('.sub-menu').slideUp(400, function() { 978 $(this).find('.sub-menu').addClass('hidden_item'); 979 $(this).find('.sub-menu').show(); 980 }); 981 } 982 }); 983 $('.device-menu').find('.dm-active').removeClass('dm-active');
984 $('.device-menu').find('.mom_custom_mega').slideUp(400, function() { 985 $('.device-menu').find('.mom_custom_mega').addClass('hidden_item'); 986 $('.device-menu').find('.mom_custom_mega').show(); 987 }); 988 } 989 $('.device-menu').slideToggle(); 990 $(this).toggleClass('active'); 991 }); 992 993 $('.device-menu > li > .responsive-caret').parent().children('a').add('.device-menu > li > .responsive-caret').click(function(e) { 994 if (!$(this).parent().hasClass('dm-active')) { 995 e.preventDefault(); 996 } 997 998 var li = $(this).parent(); 999 if (li.hasClass('dm-active') || li.find('.dm-active').length !== 0 || li.find('.sub-menu').is(':visible') || li.find('.mom_custom_mega').is(':visible') ) { 1000 li.removeClass('dm-active'); 1001 li.children('.sub-menu').slideUp(400, function() { 1002 li.children('.sub-menu').addClass('hidden_item'); 1003 li.children('.sub-menu').show(); 1004 }); 1005 if (li.find('.mom_mega_wrap').length === 0) { 1006 li.find('.sub-menu').slideUp(400, function() { 1007 li.find('.sub-menu').addClass('hidden_item'); 1008 li.find('.sub-menu').show(); 1009 }); 1010 } 1011 if (li.hasClass('mom_default_menu_item') || li.find('.cats-mega-wrap').length !== 0) { 1012 li.find('.sub-menu').slideUp(400, function() { 1013 li.find('.sub-menu').addClass('hidden_item'); 1014 li.find('.sub-menu').show(); 1015 }); 1016 li.find('.mom-megamenu').slideUp(400, function() { 1017 li.find('.mom-megamenu').addClass('hidden_item'); 1018 li.find('.mom-megamenu').show(); 1019 }); 1020 li.find('.sub-mom-megamenu').slideUp(400, function() { 1021 li.find('.sub-mom-megamenu').addClass('hidden_item'); 1022 li.find('.sub-mom-megamenu').show(); 1023 }); 1024 li.find('.sub-mom-megamenu2').slideUp(400, function() { 1025 li.find('.sub-mom-megamenu2').addClass('hidden_item'); 1026 li.find('.sub-mom-megamenu2').show(); 1027 }); 1028 } 1029 li.find('.dm-active').removeClass('dm-active'); 1030 if (li.find('.mom_custom_mega').length !== 0) { 1031 li.find('.mom_custom_mega').slideUp(400, function() { 1032 li.find('.mom_custom_mega').addClass('hidden_item'); 1033 li.find('.mom_custom_mega').show(); 1034 }); 1035 } 1036 1037 } else { 1038 $('.device-menu').find('.dm-active').removeClass('dm-active'); 1039 li.addClass('dm-active'); 1040 li.children('.sub-menu').removeClass('hidden_item').slideDown(); 1041 if (li.find('.cats-mega-wrap').length !== 0) { 1042 li.find('.sub-menu').removeClass('hidden_item').slideDown(); 1043 li.find('.mom-megamenu').removeClass('hidden_item').slideDown(); 1044 li.find('.sub-mom-megamenu').removeClass('hidden_item').slideDown(); 1045 li.find('.sub-mom-megamenu2').removeClass('hidden_item').slideDown(); 1046 } 1047 if (li.find('.mom_custom_mega').length !== 0) { 1048 li.find('.mom_custom_mega').removeClass('hidden_item').slideDown(); 1049 } 1050 1051 } 1052 }); 1053 $('.the_menu_holder_area').html($('.device-menu').find('.current-menu-item').children('a').html()); 1054 1055 //media page css problem (Very temp) 1056 $(window).resize(function() { 1057 if ($(window).width() > 1024) { 1058 $('.media-items-list #m-items').each(function(i) { 1059 var modulus = (i) % 4; 1060 if (modulus === 0) { 1061 $(this).css('clear', 'left'); 1062 } 1063 }); 1064 } 1065 }); 1066 if ($(window).width() > 1024) { 1067 $('.media-items-list #m-items').each(function(i) { 1068 var modulus = (i) % 4; 1069 if (modulus === 0) { 1070 $(this).css('clear', 'left'); 1071 } 1072 }); 1073 } 1074 1075}); // End Of File 1076 1077jQuery(document).ready(function($) { 1078 1079 // ad clicks 1080 jQuery(".mom-ad").click( function(e) { 1081 t = jQuery(this); 1082 id = t.data('id'); 1083 jQuery.ajax({ 1084 type: "post", 1085 url: momAjaxL.url, 1086 dataType: 'html', 1087 data: "action=mom_mom_adclicks&nonce=" + momAjaxL.nonce + "&id=" + id, 1088 beforeSend: function() {}, 1089 success: function() {} 1090 }); 1091 }); 1092 1093 //Momizat Timeline 1094 $('.blog-timeline-more').click(function(e) { 1095 e.preventDefault(); 1096 var t = $(this); 1097 var offset = t.data('offset'); 1098 var author = t.data('author'); 1099 var count = t.data('count'); 1100 var excat = t.data('excat'); 1101 var display = t.data('display'); 1102 var cats = t.data('cats'); 1103 var order = t.data('order'); 1104 jQuery.ajax({ 1105 type: "post", 1106 url: momAjaxL.url, 1107 dataType: 'html', 1108 data: "action=mom_timeline&nonce=" + momAjaxL.nonce + "&offset=" + offset + "&count=" + count + "&author=" + author
1108+ "&excat=" + excat + "&display=" + display + "&cats=" + cats + "&order=" + order, 1109 beforeSend: function() {}, 1110 success: function(data) { 1111 t.before(data); 1112 if (data === '') { 1113 t.text(momAjaxL.nomore); 1114 } 1115 } 1116 }); 1117 t.data('offset', offset + count); 1118 //console.log(t.data('offset')); 1119 }); 1120 1121 //Momizat categories mega menu 1122 $('.mom-megamenu.cats-mega-wrap > ul > li').on('mouseenter', function(e) { 1123 e.preventDefault(); 1124 var t = $(this); 1125 var tid = t.attr('id'); 1126 tid = tid.split('-'); 1127 tid = tid[2]; 1128 var d = t.parent().next('.sub-cat-megamenu').find('#mom-mega-cat-' + tid); 1129 var dest = t.parent().next('.sub-cat-megamenu').find('#mom-mega-cat-' + tid + ' > ul'); 1130 var id = d.data('id'); 1131 var object = d.data('object'); 1132 var layout = d.data('layout'); 1133 if (dest.children().length === 0) { 1134 jQuery.ajax({ 1135 type: "post", 1136 url: momAjaxL.url, 1137 dataType: 'html', 1138 data: "action=mmcl&nonce=" + momAjaxL.nonce + "&id=" + id + "&object=" + object + "&layout=" + layout, 1139 beforeSend: function() { 1140 dest.addClass('mn-load'); 1141 }, 1142 success: function(data) { 1143 dest.removeClass('mn-load'); 1144 dest.html(data); 1145 } 1146 }); 1147 } 1148 }); 1149 1150 1151$('.video_frame, .entry-content > p').fitVids(); 1152 1153/*------------------------------- 1154 Lightbox init 1155------------------------------- */ 1156 1157function mom_detect_mobile() { 1158 if( navigator.userAgent.match(/Android/i) 1159 || navigator.userAgent.match(/webOS/i) 1160 || navigator.userAgent.match(/iPhone/i) 1161 || navigator.userAgent.match(/iPad/i) 1162 || navigator.userAgent.match(/iPod/i) 1163 || navigator.userAgent.match(/BlackBerry/i) 1164 || navigator.userAgent.match(/Windows Phone/i) 1165 ){ 1166 return true; 1167 } 1168 else { 1169 return false; 1170 } 1171} 1172 1173function scroll_to_item (el) { 1174 if (mom_detect_mobile() === true) { 1175 return; 1176 } 1177 1178 jQuery("html, body").stop(); 1179 1180 var destination = el.offset().top; 1181 destination = destination - 220; 1182 1183 jQuery("html, body").animate({ scrollTop: destination }, { 1184 duration: 1000, 1185 } 1186 ); 1187} 1188 $('body.open_images_in_lightbox a').each(function() { 1189 if(/\.(?:jpg|jpeg|gif|png)$/i.test($(this).attr('href'))){ 1190 if (!$(this).parents().hasClass('mom_images_grid')) { 1191 $(this).addClass('lightbox-img'); 1192 } 1193 } 1194 }); 1195 1196 var last_scrolling_item = ''; 1197/*-------------------- 1198 article image 1199---------------------*/ 1200 $('.entry-content').magnificPopup({ 1201 delegate: 'a.lightbox-img', 1202 type: 'image', 1203 closeOnContentClick: true, 1204 closeBtnInside: true, 1205 mainClass: 'mfp-no-margins mfp-with-zoom', // class to remove default margin from left and right side 1206 gallery: { 1207 enabled: true 1208 }, 1209 image: { 1210 verticalFit: true, 1211 titleSrc: function(item) {//console.log(item.el); 1212 var caption = jQuery(item.el).parent().find('.wp-caption-text').text(); 1213 if (typeof caption != "undefined") { 1214 return caption; 1215 } else { 1216 return ''; 1217 } 1218 } 1219 }, 1220 iframe: { 1221 markup: '<div class="mfp-iframe-scaler">'+ 1222 '<div class="mfp-close"></div>'+ 1223 '<iframe class="mfp-iframe" frameborder="0" allowfullscreen></iframe>'+ 1224 '</div>', // HTML markup of popup, `mfp-close` will be replaced by the close button 1225 1226 patterns: { 1227 youtube: { 1228 index: 'youtube.com/', // String that detects type of video (in this case YouTube). Simply via url.indexOf(index). 1229 1230 id: 'v=', // String that splits URL in a two parts, second part should be %id% 1231 // Or null - full URL will be returned 1232 // Or a function that should return %id%, for example: 1233 // id: function(url) { return 'parsed id'; } 1234 1235 src: '//www.youtube.com/embed/%id%?autoplay=1' // URL that will be set as a source for iframe. 1236 }, 1237 vimeo: { 1238 index: 'vimeo.com/', 1239 id: '/', 1240 src: '//player.vimeo.com/video/%id%?autoplay=1' 1241 }, 1242 gmaps: { 1243 index: '//maps.google.', 1244 src: '%id%&output=embed' 1245 } 1246 1247 // you may add here more sources 1248 1249 }, 1250 1251 srcAction: 'iframe_src', // Templating object key. First part defines CSS selector, second attribute. "iframe_src" means: find "iframe" and set attribute "src". 1252}, 1253 zoom: { 1254 enabled: true, 1255 duration: 300 // don't foget to change the duration also in CSS 1256 }, 1257 callbacks: { 1258 change: function(item) { 1259 scroll_to_item(item.el); 1260 last_scrolling_item = item.el; 1261 1262 }, 1263 beforeClose: function() { 1264 scroll_to_item(last_scrolling_item); 1265 } 1266 } 1267 }); 1268/*-------------------- 1269 Gallery images 1270---------------------*/ 1271 $('.mom_images_grid, .gallery').magnificPopup({ 1272 delegate: 'a', 1273 type: 'image', 1274 closeOnContentClick: true, 1275 closeBtnInside: true, 1276 mainClass: 'mfp-no-margins mfp-with-zoom', // class to remove default margin from left and right side 1277 gallery: { 1278 enabled: true 1279 }, 1280 image: { 1281 verticalFit: true, 1282 titleSrc: 'data-title' 1283 }, 1284 zoom: { 1285 enabled: true, 1286 duration: 300 // don't foget to change the duration also in CSS 1287 }, 1288 callbacks: { 1289 } 1290 }); 1291 1292}); // end document ready 1293 1294 1295// Momizat User rate 1296jQuery(document).ready(function($) { 1297$(".mom_user_rate").mousemove(function(e){ 1298 //if(clicking == false) return; 1299 1300 var style = $(this).data('style'); 1301 var units = $(this).data('units'); 1302 var thisOffset = $(this).offset(); 1303 //or $(this).offset(); if you really just want the current element's offset 1304 var relX = e.pageX - thisOffset.left; 1305 var relY = e.pageY - thisOffset.top; 1306 if (!$(this).hasClass('rated')) { 1307 var percent = relX/parseFloat($(this).width())*100; 1308 var score = Math.round(percent); 1309 if (score > 100) { 1310 score = 100; 1311 }
1312 var starts = (score/20).toFixed(1); 1313 if (style === 'bars') { 1314 $(this).find('.ub-inner').css({width: score+'%' }); 1315 if (units === 'points') { 1316 $(this).find('.ub-inner').find('span').text(score/10); 1317 } else { 1318 $(this).find('.ub-inner').find('span').text(score+'%'); 1319 } 1320 } else if (style === 'circles') { 1321 1322 } else { 1323 $(this).children('span').css({width: (score+1)+'%' }); 1324 } 1325 //$(this).next('.mom_user_rate_score').children('span').text(score/20); 1326 if ($(this).hasClass('star-rating')) { 1327 $(this).parent().find('.yr').text(starts+'/5'); 1328 } 1329 } 1330}); 1331 1332 1333// show your user rate 1334$(".mom_user_rate, .mom_user_rate_cr").hover( function() { 1335 if (!$(this).hasClass('rated')) { 1336 $('.review-footer .mom_user_rate_title').find('.user_rate').hide(); 1337 $('.review-footer .mom_user_rate_title').find('.your_rate').show(); 1338 } 1339 1340}, function() { 1341 if (!$(this).hasClass('rated')) { 1342 $('.mom_user_rate_title').find('.user_rate').show(); 1343 $('.mom_user_rate_title').find('.your_rate').hide(); 1344 } 1345}); 1346 1347 $(".mom_user_rate").click(function(){ 1348 1349 stars = jQuery(this); 1350 post_id = stars.data("post_id"); 1351 style = stars.data("style"); 1352 score = 0; 1353 if (style === 'stars') { 1354 score = parseFloat(stars.children('span').width())/parseFloat($(this).width())*100; 1355 } 1356 if (style === 'bars') { 1357 score = parseFloat(stars.children('.ub-inner').width())/parseFloat($(this).width())*100; 1358 } 1359 score = Math.round(score); 1360 vc = stars.data("votes_count"); 1361 if (!$(this).hasClass('rated')) { 1362 1363 jQuery.ajax({ 1364 type: "post", 1365 url: momAjaxL.url, 1366 data: "action=user-rate&nonce="+momAjaxL.nonce+"&user_rate=&post_id="+post_id+"&user_rate_score="+score, 1367 success: function(rate){ 1368 if(rate != "already") 1369 { 1370 stars.addClass('rated'); 1371 $('.review-footer .mom_user_rate_title').find('.user_rate').hide(); 1372 $('.review-footer .mom_user_rate_title').find('.your_rate').show(); 1373 $('.review-footer .total-votes').find('.tv-count').text(vc+1); 1374 } 1375 //alert(score); 1376 } 1377 }); 1378 } 1379 }) 1380 1381//Circles 1382if ($('.mom-reveiw-system').length) { 1383 $(".urc-value").knob({ 1384 displayInput: false, 1385 change: function (value) { 1386 //console.log("changed to: " + value); 1387 $('.user-rate-circle').find('.cru-num').text(value); 1388 }, 1389 release: function (value) { 1390 circle = jQuery('.user-rate-circle .mom_user_rate_cr'); 1391 post_id = circle.data("post_id"); 1392 style = circle.data("style"); 1393 score = value; 1394 vc = circle.data("votes_count"); 1395 1396 jQuery.ajax({ 1397 type: "post", 1398 url: momAjaxL.url, 1399 data: "action=user-rate&nonce="+momAjaxL.nonce+"&user_rate=&post_id="+post_id+"&user_rate_score="+score, 1400 success: function(rate){ 1401 if(rate != "already") 1402 { 1403 circle.addClass('rated'); 1404 $('.review-footer .mom_user_rate_title').find('.user_rate').hide(); 1405 $('.review-footer .mom_user_rate_title').find('.your_rate').show(); 1406 $('.review-footer .total-votes').find('.tv-count').text(vc+1); 1407 1408 } 1409 1410 //alert(score); 1411 } 1412 }); 1413 } 1414 }); 1415} 1416 1417// set and get posts views with ajax 1418if ($('body').hasClass('post_views_with_ajax')) { 1419 if ($('body').hasClass('single')) { 1420 jQuery.ajax({ 1421 type: "post", 1422 url: momAjaxL.url, 1423 dataType: "html", 1424 data: "action=mom_set_post_views&nonce=" + momAjaxL.nonce + "&id=" + momAjaxL.postid, 1425 beforeSend: function() {}, 1426 success: function(e) { 1427 } 1428 }) 1429 1430 } 1431 1432 $('.post').each(function () { 1433 var t = $(this); 1434 var v = t.find('.post-views'); 1435 var id = t.data('id'); 1436 if (v.length) { 1437 jQuery.ajax({ 1438 type: "post", 1439 url: momAjaxL.url, 1440 dataType: "html", 1441 data: "action=mom_post_views&nonce=" + momAjaxL.nonce + "&id=" + id+ "&echo=" + 1, 1442 beforeSend: function() {}, 1443 success: function(e) { 1444 s = v.find('span'); 1445 v.fadeIn(); 1446 v.html(e); 1447 v.prepend(s); 1448 } 1449 }); 1450 } 1451 }); 1452} 1453 1454 1455}); 1456 1457//ajax 1458jQuery(document).ready(function() { 1459 jQuery(".mom-search-form input.sf").on("keyup", function() { 1460 return sf = jQuery(this), term = sf.val(), term.length > 2 ? setTimeout(function() { 1461 jQuery.ajax({ 1462 type: "post", 1463 url: momAjaxL.url, 1464 dataType: "html",
1465 data: "action=mom_ajaxsearch&nonce=" + momAjaxL.nonce + "&term=" + term, 1466 beforeSend: function() { 1467 sf.parent().find(".sf-loading").fadeIn() 1468 }, 1469 success: function(e) { 1470 "" !== sf.val() ? (sf.parent().next(".ajax-search-results").html(e), "" !== e ? sf.parent().next(".ajax-search-results").append('<h4 class="show-all-results"><a href="' + momAjaxL.homeUrl + "/?s=" + term + '">' + momAjaxL.viewAll + '<i class="fa-icon-long-arrow-right"></i></a></h4>') : (sf.parent().next(".ajax-search-results").find("show_all_results").remove(), sf.parent().next(".ajax-search-results").html('<span class="sw-not_found">' + momAjaxL.noResults + "</span>"))) : sf.parent().next(".ajax-search-results").html(""), sf.parent().find(".sf-loading").fadeOut() 1471 } 1472 }) 1473 }, 300) : setTimeout(function() { 1474 jQuery.ajax({ 1475 type: "post", 1476 url: momAjaxL.url, 1477 dataType: "html", 1478 data: "action=mom_ajaxsearch&nonce=" + momAjaxL.nonce + "&term=" + term, 1479 success: function() { 1480 "" === sf.val() && sf.parent().next(".ajax-search-results").html("") 1481 } 1482 }) 1483 }, 300), !1 1484 }) 1485}), jQuery(document).ready(function(e) { 1486 offset = ''; 1487 jQuery(".media-tabs li a").on("click", function() { 1488 return t = jQuery(this).parent(), type = t.data("type"), count = t.parent().data("count"), jQuery.ajax({ 1489 type: "post", 1490 url: momAjaxL.url, 1491 dataType: "html", 1492 data: "action=mom_media_tab&nonce=" + momAjaxL.nonce + "&type=" + type + "&count=" + count, 1493 beforeSend: function() { 1494 t.parent().parent().parent().append('<i class="nb-load"></i>') 1495 }, 1496 success: function(a) { 1497 "" !== a && (e(".media-page-content").html(a), e(".media-tabs > li").removeClass("active"), t.addClass("active")), t.parent().parent().parent().find(".nb-load").remove(); 1498 offset = e('.media-show-more > a.show-more-posts').data('offset', e('.media-show-more > a.show-more-posts').data('count')); 1499 e('.media-show-more').show(); 1500 } 1501 }), !1 1502 }), jQuery(".media-show-more > a.show-more-posts").on("click", function() { 1503 return t = jQuery(this), offset = t.data("offset"), count = t.data("count"), type = e('.media-tabs > li.active').data("type"), jQuery.ajax({ 1504 type: "post", 1505 url: momAjaxL.url, 1506 dataType: "html", 1507 data: "action=mom_media_tab&nonce=" + momAjaxL.nonce + "&type=" + type + "&count=" + count + "&offset=" + offset, 1508 beforeSend: function() { 1509 t.parent().parent().append('<i class="nb-load"></i>') 1510 }, 1511 success: function(a) { 1512 if (a !== '') { 1513 e(".media-page-content").html(a); 1514 } else { 1515 t.parent().hide(); 1516 } 1517 t.parent().parent().find(".nb-load").remove(); 1518 } 1519 }), t.data('offset', offset+count), !1 1520 1521 }), jQuery("#media-sort").on("change", function() { 1522 return order = jQuery(this).val(), type = jQuery(this).parent().parent().siblings().find("li.active").data("type"), count = jQuery(this).parent().parent().siblings().find("li.active").parent().data("count"), jQuery.ajax({ 1523 type: "post", 1524 url: momAjaxL.url, 1525 dataType: "html", 1526 data: "action=mom_media_tab&nonce=" + momAjaxL.nonce + "&type=" + type + "&order=" + order + "&count=" + count, 1527 beforeSend: function() {}, 1528 success: function(t) { 1529 "" !== t && e(".media-page-content").html(t); 1530 1531 offset = e('.media-show-more > a.show-more-posts').data('offset', e('.media-show-more > a.show-more-posts').data('count')); 1532 e('.media-show-more').show(); 1533 } 1534 }), !1 1535 }) 1536}), jQuery(document).ready(function(e) { 1537 offset = "", offset_rest = "", offset_sec = "", jQuery(".section footer.show_more_ajax a").click(function(e) { 1538 e.preventDefault(), bt = jQuery(this), where = bt.parent().prev(), nbs = bt.parent().data("nbs"),display = bt.parent().data("display"),tag = bt.parent().data("tag"), nop = bt.parent().data("number_of_posts"), norder = bt.parent().data("orderby"), post_type = bt.data("post_type"), offset = bt.data("offset"), nb_excerpt = bt.parent().data("nb_excerpt"), ("nb2" == nbs || "nb4" == nbs || "nb5" == nbs) && (offset_rest = offset + 1), "nb3" == nbs && (offset_sec = offset + 1, offset_rest = offset + 2), cat = bt.parent().parent().find(".nb-tabbed-head").find("li.active a").data("cat_id"), ("" === cat || void 0 === cat) && (cat = bt.parent().data("cat_id")), jQuery.ajax({ 1539 type: "post", 1540 url: momAjaxL.url, 1541 dataType: "html", 1542 data: "action=nbsm&nonce=" + momAjaxL.nonce + "&cat=" + cat + "&nbs=" + nbs + "&number_of_posts=" + nop + "&orderby=" + norder + "&offset=" + offset + "&offset_all=" + offset_rest + "&offset_second=" + offset_sec + "&nb_excerpt=" + nb_excerpt + "&post_type=" + post_type + "&tag=" + tag + "&display=" + display, 1543 beforeSend: function() { 1544 where.parent().append('<i class="nb-load"></i>') 1545 }, 1546 success: function(e) { 1547 "" == e && bt.parent().append('<a class="nomoreposts">' + momAjaxL.nomore + "</a>").hide().fadeIn(), "" !== e && where.html(e), where.parent().find(".nb-load").remove() 1548 }, 1549 complete: function() {} 1550 }), ("nb1" == nbs || "list" == nbs) && bt.data("offset", offset + nop), "nb2" == nbs && bt.data("offset", offset + nop + 1), "nb3" == nbs && bt.data("offset", offset + nop + 2), ("nb4" == nbs || "nb5" == nbs) && bt.data("offset", offset + nop + 1), "nb6" == nbs && bt.data("offset", offset + nop), console.log(post_type) 1551 }), jQuery(".nb-tabbed-head li a:not(.more_categories_handle)").click(function(t) { 1552 t.preventDefault(); 1553 { 1554 var a = e(this), n = (a.parents('.nb-tabbed-head'), e(this).parents('.nb-tabbed-head').parent().next()), s = a.parents('.nb-tabbed-head').data("nbs"); 1555 a.parents('.nb-tabbed-head').data("number_of_posts"), a.parents('.nb-tabbed-head').data("orderby") 1556 } 1557 n.parent().find(".show-more").find(".nomoreposts").remove(), origoff = n.parent().find(".show-more").find("a").data("orig-offset"), n.parent().find(".show-more").find("a").data("offset", origoff), ("nb2" == s || "nb4" == s || "nb5" == s) && (offset_rest = n.parent().find(".show-more").find("a").data("offset") + 1), "nb3" == s && (offset_sec = n.parent().find(".show-more").find("a").data("offset") + 1, offset_rest = n.parent().find(".show-more").find("a").data("offset") + 2)//, console.log(n.parent().find(".show-more").find("a").data("offset"))//, console.log(offset_sec), console.log(offset_rest) 1558 }) 1559}), jQuery(document).ready(function(e) { 1560 jQuery(".nb-tabbed-head li a:not(.more_categories_handle)").click(function(t) { 1561 t.preventDefault(); 1562 var a = e(this), n = a.parents('.nb-tabbed-head'), s = e(this).parents('.nb-tabbed-head').parent().next(), o = a.parents('.nb-tabbed-head').data("nbs"), r = a.parents('.nb-tabbed-head').data("number_of_posts"), f = a.parents('.nb-tabbed-head').data("nb_excerpt"), i = 1; 1563 "nb3" == o && (i = 2), cat = a.data("cat_id"), "" === cat && (cat = a.data("parent_cat")), s.parent().find(".show-more").find(".nomoreposts").remove(), jQuery.ajax({ 1564 type: "post", 1565 url: momAjaxL.url, 1566 dataType: "html", 1567 data: "action=nbtabs&nonce=" + momAjaxL.nonce + "&cat=" + cat + "&nbs=" + o + "&number_of_posts=" + r + "&nb_excerpt=" + f + "&offset=" + i, 1568 cach: !1, 1569 beforeSend: function() { 1570 s.parent().append('<i class="nb-load"></i>') 1571 }, 1572 success: function(e) { 1573 s.hide().html(e).fadeIn("slow"), n.find("li").removeClass("active"), a.parent().addClass("active"), s.parent().find(".nb-load").remove() 1574 } 1575 }) 1576 }) 1577}), jQuery(document).ready(function(e) { 1578 jQuery(".mom_mailchimp_subscribe").submit(function() { 1579 return sf = jQuery(this), email = sf.find(".mms-email").val(), list = sf.data("list_id"), e(".message-box").fadeOut(), "" === email ? sf.before('<span class="message-box error">' + momAjaxL.error2 + '<i class="brankic-icon-error"></i></span>') : mom_isValidEmailAddress(email) ? jQuery.ajax({ 1580 type: "post", 1581 url: momAjaxL.url, 1582 dataType: "html", 1583 data: "action=mom_mailchimp&nonce=" + momAjaxL.nonce + "&email=" + email + "&list_id=" + list, 1584 beforeSend: function() { 1585 sf.find(".sf-loading").fadeIn() 1586 }, 1587 success: function(t) { 1588 "success" === t ? (sf.find(".email").val(""), sf.before('<span class="message-box success">' + momAjaxL.success + '<i class="brankic-icon-error"></i></span>').hide().fadeIn()) : sf.before('<span class="message-box error">' + momAjaxL.error + '<i class="brankic-icon-error"></i></span>').hide().fadeIn(), sf.find(".sf-loading").fadeOut(), e(".message-box i").on("click", function() { 1589 e(this).parent().fadeOut() 1590 }) 1591 } 1592 }) : sf.before('<span class="message-box error">' + momAjaxL.error2 + '<i class="brankic-icon-error"></i></span>'), !1 1593 }) 1594}); 1595 1596function mom_isValidEmailAddress(emailAddress) { 1597 var pattern = new RegExp(/^(("[\w-+\s]+")|([\w-+]+(?:\.[\w-+]+)*)|("[\w-+\s]+")([\w-+]+(?:\.[\w-+]+)*))(@((?:[\w-+]+\.)*\w[\w-+]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$)|(@\[?((25[0-5]\.|2[0-4][\d]\.|1[\d]{2}\.|[\d]{1,2}\.))((25[0-5]|2[0-4][\d]|1[\d]{2}|[\d]{1,2})\.){2}(25[0-5]|2[0-4][\d]|1[\d]{2}|[\d]{1,2})\]?$)/i); 1598 return pattern.test(emailAddress); 1599}; 1600/*! 1601 * imagesLoaded PACKAGED v3.1.8 1602 * JavaScript is all like "You images are done yet or what?" 1603 * MIT License 1604 */ 1605 1606(function(){function e(){}function t(e,t){for(var n=e.length;n--;)if(e[n].listener===t)return n;return-1}function n(e){return function(){return this[e].apply(this,arguments)}}var i=e.prototype,r=this,o=r.EventEmitter;i.getListeners=function(e){var t,n,i=this._getEvents();if("object"==typeof e){t={};for(n in i)i.hasOwnProperty(n)&&e.test(n)&&(t[n]=i[n])}else t=i[e]||(i[e]=[]);return t},i.flattenListeners=function(e){var t,n=[];for(t=0;e.length>t;t+=1)n.push(e[t].listener);return n},i.getListenersAsObject=function(e){var t,n=this.getListeners(e);return n instanceof Array&&(t={},t[e]=n),t||n},i.addListener=function(e,n){var i,r=this.getListenersAsObject(e),o="object"==typeof n;for(i in r)r.hasOwnProperty(i)&&-1===t(r[i],n)&&r[i].push(o?n:{listener:n,once:!1});return this},i.on=n("addListener"),i.addOnceListener=function(e,t){return this.addListener(e,{listener:t,once:!0})},i.once=n("addOnceListener"),i.defineEvent=function(e){return this.getListeners(e),this},i.defineEvents=function(e){for(var t=0;e.length>t;t+=1)this.defineEvent(e[t]);return this},i.removeListener=function(e,n){var i,r,o=this.getListenersAsObject(e);for(r in o)o.hasOwnProperty(r)&&(i=t(o[r],n),-1!==i&&o[r].splice(i,1));return this},i.off=n("removeListener"),i.addListeners=function(e,t){return this.manipulateListeners(!1,e,t)},i.removeListeners=function(e,t){return this.manipulateListeners(!0,e,t)},i.manipulateListeners=function(e,t,n){var i,r,o=e?this.removeListener:this.addListener,s=e?this.removeListeners:this.addListeners;if("object"!=typeof t||t instanceof RegExp)for(i=n.length;i--;)o.call(this,t,n[i]);else for(i in t)t.hasOwnProperty(i)&&(r=t[i])&&("function"==typeof r?o.call(this,i,r):s.call(this,i,r));return this},i.removeEvent=function(e){var t,n=typeof e,i=this._getEvents();if("string"===n)delete i[e];else if("object"===n)for(t in i)i.hasOwnProperty(t)&&e.test(t)&&delete i[t];else delete this._events;return this},i.removeAllListeners=n("removeEvent"),i.emitEvent=function(e,t){var n,i,r,o,s=this.getListenersAsObject(e);for(r in s)if(s.hasOwnProperty(r))for(i=s[r].length;i--;)n=s[r][i],n.once===!0&&this.removeListener(e,n.listener),o=n.listener.apply(this,t||[]),o===this._getOnceReturnValue()&&this.removeListener(e,n.listener);return this},i.trigger=n("emitEvent"),i.emit=function(e){var t=Array.prototype.slice.call(arguments,1
1606);return this.emitEvent(e,t)},i.setOnceReturnValue=function(e){return this._onceReturnValue=e,this},i._getOnceReturnValue=function(){return this.hasOwnProperty("_onceReturnValue")?this._onceReturnValue:!0},i._getEvents=function(){return this._events||(this._events={})},e.noConflict=function(){return r.EventEmitter=o,e},"function"==typeof define&&define.amd?define("eventEmitter/EventEmitter",[],function(){return e}):"object"==typeof module&&module.exports?module.exports=e:this.EventEmitter=e}).call(this),function(e){function t(t){var n=e.event;return n.target=n.target||n.srcElement||t,n}var n=document.documentElement,i=function(){};n.addEventListener?i=function(e,t,n){e.addEventListener(t,n,!1)}:n.attachEvent&&(i=function(e,n,i){e[n+i]=i.handleEvent?function(){var n=t(e);i.handleEvent.call(i,n)}:function(){var n=t(e);i.call(e,n)},e.attachEvent("on"+n,e[n+i])});var r=function(){};n.removeEventListener?r=function(e,t,n){e.removeEventListener(t,n,!1)}:n.detachEvent&&(r=function(e,t,n){e.detachEvent("on"+t,e[t+n]);try{delete e[t+n]}catch(i){e[t+n]=void 0}});var o={bind:i,unbind:r};"function"==typeof define&&define.amd?define("eventie/eventie",o):e.eventie=o}(this),function(e,t){"function"==typeof define&&define.amd?define(["eventEmitter/EventEmitter","eventie/eventie"],function(n,i){return t(e,n,i)}):"object"==typeof exports?module.exports=t(e,require("wolfy87-eventemitter"),require("eventie")):e.imagesLoaded=t(e,e.EventEmitter,e.eventie)}(window,function(e,t,n){function i(e,t){for(var n in t)e[n]=t[n];return e}function r(e){return"[object Array]"===d.call(e)}function o(e){var t=[];if(r(e))t=e;else if("number"==typeof e.length)for(var n=0,i=e.length;i>n;n++)t.push(e[n]);else t.push(e);return t}function s(e,t,n){if(!(this instanceof s))return new s(e,t);"string"==typeof e&&(e=document.querySelectorAll(e)),this.elements=o(e),this.options=i({},this.options),"function"==typeof t?n=t:i(this.options,t),n&&this.on("always",n),this.getImages(),a&&(this.jqDeferred=new a.Deferred);var r=this;setTimeout(function(){r.check()})}function f(e){this.img=e}function c(e){this.src=e,v[e]=this}var a=e.jQuery,u=e.console,h=u!==void 0,d=Object.prototype.toString;s.prototype=new t,s.prototype.options={},s.prototype.getImages=function(){this.images=[];for(var e=0,t=this.elements.length;t>e;e++){var n=this.elements[e];"IMG"===n.nodeName&&this.addImage(n);var i=n.nodeType;if(i&&(1===i||9===i||11===i))for(var r=n.querySelectorAll("img"),o=0,s=r.length;s>o;o++){var f=r[o];this.addImage(f)}}},s.prototype.addImage=function(e){var t=new f(e);this.images.push(t)},s.prototype.check=function(){function e(e,r){return t.options.debug&&h&&u.log("confirm",e,r),t.progress(e),n++,n===i&&t.complete(),!0}var t=this,n=0,i=this.images.length;if(this.hasAnyBroken=!1,!i)return this.complete(),void 0;for(var r=0;i>r;r++){var o=this.images[r];o.on("confirm",e),o.check()}},s.prototype.progress=function(e){this.hasAnyBroken=this.hasAnyBroken||!e.isLoaded;var t=this;setTimeout(function(){t.emit("progress",t,e),t.jqDeferred&&t.jqDeferred.notify&&t.jqDeferred.notify(t,e)})},s.prototype.complete=function(){var e=this.hasAnyBroken?"fail":"done";this.isComplete=!0;var t=this;setTimeout(function(){if(t.emit(e,t),t.emit("always",t),t.jqDeferred){var n=t.hasAnyBroken?"reject":"resolve";t.jqDeferred[n](t)}})},a&&(a.fn.imagesLoaded=function(e,t){var n=new s(this,e,t);return n.jqDeferred.promise(a(this))}),f.prototype=new t,f.prototype.check=function(){var e=v[this.img.src]||new c(this.img.src);if(e.isConfirmed)return this.confirm(e.isLoaded,"cached was confirmed"),void 0;if(this.img.complete&&void 0!==this.img.naturalWidth)return this.confirm(0!==this.img.naturalWidth,"naturalWidth"),void 0;var t=this;e.on("confirm",function(e,n){return t.confirm(e.isLoaded,n),!0}),e.check()},f.prototype.confirm=function(e,t){this.isLoaded=e,this.emit("confirm",this,t)};var v={};return c.prototype=new t,c.prototype.check=function(){if(!this.isChecked){var e=new Image;n.bind(e,"load",this),n.bind(e,"error",this),e.src=this.src,this.isChecked=!0}},c.prototype.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},c.prototype.onload=function(e){this.confirm(!0,"onload"),this.unbindProxyEvents(e)},c.prototype.onerror=function(e){this.confirm(!1,"onerror"),this.unbindProxyEvents(e)},c.prototype.confirm=function(e,t){this.isConfirmed=!0,this.isLoaded=e,this.emit
1606("confirm",this,t)},c.prototype.unbindProxyEvents=function(e){n.unbind(e.target,"load",this),n.unbind(e.target,"error",this)},s}); 1607 1608// Duoble tab to go 1609;(function( $, window, document, undefined ) 1610{ 1611 $.fn.doubleTapToGo = function( params ) 1612 { 1613 if( !( 'ontouchstart' in window ) && 1614 !navigator.msMaxTouchPoints && 1615 !navigator.userAgent.toLowerCase().match( /windows phone os 7/i ) ) return false; 1616 1617 this.each( function() 1618 { 1619 var curItem = false; 1620 1621 $( this ).on( 'click', function( e ) 1622 { 1623 var item = $( this ); 1624 if( item[ 0 ] != curItem[ 0 ] ) 1625 { 1626 e.preventDefault(); 1627 curItem = item; 1628 } 1629 }); 1630 1631 $( document ).on( 'click touchstart MSPointerDown', function( e ) 1632 { 1633 var resetItem = true, 1634 parents = $( e.target ).parents(); 1635 1636 for( var i = 0; i < parents.length; i++ ) 1637 if( parents[ i ] == curItem[ 0 ] ) 1638 resetItem = false; 1639 1640 if( resetItem ) 1641 curItem = false; 1642 }); 1643 }); 1644 return this; 1645 }; 1646})( jQuery, window, document ); 1647 1648 1649// Jquery cookies 1650!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e(require("jquery")):e(jQuery)}(function(e){function n(e){return u.raw?e:encodeURIComponent(e)}function o(e){return u.raw?e:decodeURIComponent(e)}function i(e){return n(u.json?JSON.stringify(e):String(e))}function t(e){0===e.indexOf('"')&&(e=e.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return e=decodeURIComponent(e.replace(c," ")),u.json?JSON.parse(e):e}catch(n){}}function r(n,o){var i=u.raw?n:t(n);return e.isFunction(o)?o(i):i}var c=/\+/g,u=e.cookie=function(t,c,s){if(arguments.length>1&&!e.isFunction(c)){if(s=e.extend({},u.defaults,s),"number"==typeof s.expires){var a=s.expires,d=s.expires=new Date;d.setMilliseconds(d.getMilliseconds()+864e5*a)}return document.cookie=[n(t),"=",i(c),s.expires?"; expires="+s.expires.toUTCString():"",s.path?"; path="+s.path:"",s.domain?"; domain="+s.domain:"",s.secure?"; secure":""].join("")}for(var f=t?void 0:{},p=document.cookie?document.cookie.split("; "):[],l=0,m=p.length;m>l;l++){var x=p[l].split("="),g=o(x.shift()),j=x.join("=");if(t===g){f=r(j,c);break}t||void 0===(j=r(j))||(f[g]=j)}return f};u.defaults={},e.removeCookie=function(n,o){return e.cookie(n,"",e.extend({},o,{expires:-1})),!e.cookie(n)}}); 1651 1652 1653/*! Magnific Popup - v1.0.0 - 2015-01-03 1654* http://dimsemenov.com/plugins/magnific-popup/ 1655* Copyright (c) 2015 Dmitry Semenov; */ 1656 1657!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):window.jQuery||window.Zepto)}(function(a){var b,c,d,e,f,g,h="Close",i="BeforeClose",j="AfterClose",k="BeforeAppend",l="MarkupParse",m="Open",n="Change",o="mfp",p="."+o,q="mfp-ready",r="mfp-removing",s="mfp-prevent-close",t=function(){},u=!!window.jQuery,v=a(window),w=function(a,c){b.ev.on(o+a+p,c)},x=function(b,c,d,e){var f=document.createElement("div");return f.className="mfp-"+b,d&&(f.innerHTML=d),e?c&&c.appendChild(f):(f=a(f),c&&f.appendTo(c)),f},y=function(c,d){b.ev.triggerHandler(o+c,d),b.st.callbacks&&(c=c.charAt(0).toLowerCase()+c.slice(1),b.st.callbacks[c]&&b.st.callbacks[c].apply(b,a.isArray(d)?d:[d]))},z=function(c){return c===g&&b.currTemplate.closeBtn||(b.currTemplate.closeBtn=a(b.st.closeMarkup.replace("%title%",b.st.tClose)),g=c),b.currTemplate.closeBtn},A=function(){a.magnificPopup.instance||(b=new t,b.init(),a.magnificPopup.instance=b)},B=function(){var a=document.createElement("p").style,b=["ms","O","Moz","Webkit"];if(void 0!==a.transition)return!0;for(;b.length;)if(b.pop()+"Transition"in a)return!0;return!1};t.prototype={constructor:t,init:function(){var c=navigator.appVersion;b.isIE7=-1!==c.indexOf("MSIE 7."),b.isIE8=-1!==c.indexOf("MSIE 8."),b.isLowIE=b.isIE7||b.isIE8,b.isAndroid=/android/gi.test(c),b.isIOS=/iphone|ipad|ipod/gi.test(c),b.supportsTransition=B(),b.probablyMobile=b.isAndroid||b.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),d=a(document),b.popupsCache={}},open:function(c){var e;if(c.isObj===!1){b.items=c.items.toArray(),b.index=0;var g,h=c.items;for(e=0;e<h.length;e++)if(g=h[e],g.parsed&&(g=g.el[0]),g===c.el[0]){b.index=e;break}}else b.items=a.isArray(c.items)?c.items:[c.items],b.index=c.index||0;if(b.isOpen)return void b.updateItemHTML();b.types=[],f="",b.ev=c.mainEl&&c.mainEl.length?c.mainEl.eq(0):d,c.key?(b.popupsCache[c.key]||(b.popupsCache[c.key]={}),b.currTemplate=b.popupsCache[c.key]):b.currTemplate={},b.st=a.extend(!0,{},a.magnificPopup.defaults,c),b.fixedContentPos="auto"===b.st.fixedContentPos?!b.probablyMobile:b.st.fixedContentPos,b.st.modal&&(b.st.closeOnContentClick=!1,b.st.closeOnBgClick=!1,b.st.showCloseBtn=!1,b.st.enableEscapeKey=!1),b.bgOverlay||(b.bgOverlay=x("bg").on("click"+p,function(){b.close()}),b.wrap=x("wrap").attr("tabindex",-1).on("click"+p,function(a){b._checkIfClose(a.target)&&b.close()}),b.container=x("container",b.wrap)),b.contentContainer=x("content"),b.st.preloader&&(b.preloader=x("preloader",b.container,b.st.tLoading));var i=a.magnificPopup.modules;for(e=0;e<i.length;e++){var j=i[e];j=j.charAt(0).toUpperCase()+j.slice(1),b["init"+j].call(b)}y("BeforeOpen"),b.st.showCloseBtn&&(b.st.closeBtnInside?(w(l,function(a,b,c,d){c.close_replaceWith=z(d.type)}),f+=" mfp-close-btn-in"):b.wrap.append(z())),b.st.alignTop&&(f+=" mfp-align-top"),b.wrap.css(b.fixedContentPos?{overflow:b.st.overflowY,overflowX:"hidden",overflowY:b.
1657st.overflowY}:{top:v.scrollTop(),position:"absolute"}),(b.st.fixedBgPos===!1||"auto"===b.st.fixedBgPos&&!b.fixedContentPos)&&b.bgOverlay.css({height:d.height(),position:"absolute"}),b.st.enableEscapeKey&&d.on("keyup"+p,function(a){27===a.keyCode&&b.close()}),v.on("resize"+p,function(){b.updateSize()}),b.st.closeOnContentClick||(f+=" mfp-auto-cursor"),f&&b.wrap.addClass(f);var k=b.wH=v.height(),n={};if(b.fixedContentPos&&b._hasScrollBar(k)){var o=b._getScrollbarSize();o&&(n.marginRight=o)}b.fixedContentPos&&(b.isIE7?a("body, html").css("overflow","hidden"):n.overflow="hidden");var r=b.st.mainClass;return b.isIE7&&(r+=" mfp-ie7"),r&&b._addClassToMFP(r),b.updateItemHTML(),y("BuildControls"),a("html").css(n),b.bgOverlay.add(b.wrap).prependTo(b.st.prependTo||a(document.body)),b._lastFocusedEl=document.activeElement,setTimeout(function(){b.content?(b._addClassToMFP(q),b._setFocus()):b.bgOverlay.addClass(q),d.on("focusin"+p,b._onFocusIn)},16),b.isOpen=!0,b.updateSize(k),y(m),c},close:function(){b.isOpen&&(y(i),b.isOpen=!1,b.st.removalDelay&&!b.isLowIE&&b.supportsTransition?(b._addClassToMFP(r),setTimeout(function(){b._close()},b.st.removalDelay)):b._close())},_close:function(){y(h);var c=r+" "+q+" ";if(b.bgOverlay.detach(),b.wrap.detach(),b.container.empty(),b.st.mainClass&&(c+=b.st.mainClass+" "),b._removeClassFromMFP(c),b.fixedContentPos){var e={marginRight:""};b.isIE7?a("body, html").css("overflow",""):e.overflow="",a("html").css(e)}d.off("keyup"+p+" focusin"+p),b.ev.off(p),b.wrap.attr("class","mfp-wrap").removeAttr("style"),b.bgOverlay.attr("class","mfp-bg"),b.container.attr("class","mfp-container"),!b.st.showCloseBtn||b.st.closeBtnInside&&b.currTemplate[b.currItem.type]!==!0||b.currTemplate.closeBtn&&b.currTemplate.closeBtn.detach(),b._lastFocusedEl&&a(b._lastFocusedEl).focus(),b.currItem=null,b.content=null,b.currTemplate=null,b.prevHeight=0,y(j)},updateSize:function(a){if(b.isIOS){var c=document.documentElement.clientWidth/window.innerWidth,d=window.innerHeight*c;b.wrap.css("height",d),b.wH=d}else b.wH=a||v.height();b.fixedContentPos||b.wrap.css("height",b.wH),y("Resize")},updateItemHTML:function(){var c=b.items[b.index];b.contentContainer.detach(),b.content&&b.content.detach(),c.parsed||(c=b.parseEl(b.index));var d=c.type;if(y("BeforeChange",[b.currItem?b.currItem.type:"",d]),b.currItem=c,!b.currTemplate[d]){var f=b.st[d]?b.st[d].markup:!1;y("FirstMarkupParse",f),b.currTemplate[d]=f?a(f):!0}e&&e!==c.type&&b.container.removeClass("mfp-"+e+"-holder");var g=b["get"+d.charAt(0).toUpperCase()+d.slice(1)](c,b.currTemplate[d]);b.appendContent(g,d),c.preloaded=!0,y(n,c),e=c.type,b.container.prepend(b.contentContainer),y("AfterChange")},appendContent:function(a,c){b.content=a,a?b.st.showCloseBtn&&b.st.closeBtnInside&&b.currTemplate[c]===!0?b.content.find(".mfp-close").length||b.content.append(z()):b.content=a:b.content="",y(k),b.container.addClass("mfp-"+c+"-holder"),b.contentContainer.append(b.content)},parseEl:function(c){var d,e=b.items[c];if(e.tagName?e={el:a(e)}:(d=e.type,e={data:e,src:e.src}),e.el){for(var f=b.types,g=0;g<f.length;g++)if(e.el.hasClass("mfp-"+f[g])){d=f[g];break}e.src=e.el.attr("data-mfp-src"),e.src||(e.src=e.el.attr("href"))}return e.type=d||b.st.type||"inline",e.index=c,e.parsed=!0,b.items[c]=e,y("ElementParse",e),b.items[c]},addGroup:function(a,c){var d=function(d){d.mfpEl=this,b._openClick(d,a,c)};c||(c={});var e="click.magnificPopup";c.mainEl=a,c.items?(c.isObj=!0,a.off(e).on(e,d)):(c.isObj=!1,c.delegate?a.off(e).on(e,c.delegate,d):(c.items=a,a.off(e).on(e,d)))},_openClick:function(c,d,e){var f=void 0!==e.midClick?e.midClick:a.magnificPopup.defaults.midClick;if(f||2!==c.which&&!c.ctrlKey&&!c.metaKey){var g=void 0!==e.disableOn?e.disableOn:a.magnificPopup.defaults.disableOn;if(g)if(a.isFunction(g)){if(!g.call(b))return!0}else if(v.width()<g)return!0;c.type&&(c.preventDefault(),b.isOpen&&c.stopPropagation()),e.el=a(c.mfpEl),e.delegate&&(e.items=d.find(e.delegate)),b.open(e)}},updateStatus:function(a,d){if(b.preloader){c!==a&&b.container.removeClass("mfp-s-"+c),d||"loading"!==a||(d=b.st.tLoading);var e={status:a,text:d};y("UpdateStatus",e),a=e.status,d=e.text,b.preloader.html(d),b.preloader.find("a").on("click",function(a){a.stopImmediatePropagation()}),b.container.addClass("mfp-s-"+a),c=a}},_checkIfClose:function(c){if(!a(c).hasClass(s)){var d=b.st.closeOnContentClick,e=b.st.closeOnBgClick;if(d&&e)return!0;
1657if(!b.content||a(c).hasClass("mfp-close")||b.preloader&&c===b.preloader[0])return!0;if(c===b.content[0]||a.contains(b.content[0],c)){if(d)return!0}else if(e&&a.contains(document,c))return!0;return!1}},_addClassToMFP:function(a){b.bgOverlay.addClass(a),b.wrap.addClass(a)},_removeClassFromMFP:function(a){this.bgOverlay.removeClass(a),b.wrap.removeClass(a)},_hasScrollBar:function(a){return(b.isIE7?d.height():document.body.scrollHeight)>(a||v.height())},_setFocus:function(){(b.st.focus?b.content.find(b.st.focus).eq(0):b.wrap).focus()},_onFocusIn:function(c){return c.target===b.wrap[0]||a.contains(b.wrap[0],c.target)?void 0:(b._setFocus(),!1)},_parseMarkup:function(b,c,d){var e;d.data&&(c=a.extend(d.data,c)),y(l,[b,c,d]),a.each(c,function(a,c){if(void 0===c||c===!1)return!0;if(e=a.split("_"),e.length>1){var d=b.find(p+"-"+e[0]);if(d.length>0){var f=e[1];"replaceWith"===f?d[0]!==c[0]&&d.replaceWith(c):"img"===f?d.is("img")?d.attr("src",c):d.replaceWith('<img src="'+c+'" class="'+d.attr("class")+'" />'):d.attr(e[1],c)}}else b.find(p+"-"+a).html(c)})},_getScrollbarSize:function(){if(void 0===b.scrollbarSize){var a=document.createElement("div");a.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(a),b.scrollbarSize=a.offsetWidth-a.clientWidth,document.body.removeChild(a)}return b.scrollbarSize}},a.magnificPopup={instance:null,proto:t.prototype,modules:[],open:function(b,c){return A(),b=b?a.extend(!0,{},b):{},b.isObj=!0,b.index=c||0,this.instance.open(b)},close:function(){return a.magnificPopup.instance&&a.magnificPopup.instance.close()},registerModule:function(b,c){c.options&&(a.magnificPopup.defaults[b]=c.options),a.extend(this.proto,c.proto),this.modules.push(b)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'<button title="%title%" type="button" class="mfp-close">×</button>',tClose:"Close (Esc)",tLoading:"Loading..."}},a.fn.magnificPopup=function(c){A();var d=a(this);if("string"==typeof c)if("open"===c){var e,f=u?d.data("magnificPopup"):d[0].magnificPopup,g=parseInt(arguments[1],10)||0;f.items?e=f.items[g]:(e=d,f.delegate&&(e=e.find(f.delegate)),e=e.eq(g)),b._openClick({mfpEl:e},d,f)}else b.isOpen&&b[c].apply(b,Array.prototype.slice.call(arguments,1));else c=a.extend(!0,{},c),u?d.data("magnificPopup",c):d[0].magnificPopup=c,b.addGroup(d,c);return d};var C,D,E,F="inline",G=function(){E&&(D.after(E.addClass(C)).detach(),E=null)};a.magnificPopup.registerModule(F,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){b.types.push(F),w(h+"."+F,function(){G()})},getInline:function(c,d){if(G(),c.src){var e=b.st.inline,f=a(c.src);if(f.length){var g=f[0].parentNode;g&&g.tagName&&(D||(C=e.hiddenClass,D=x(C),C="mfp-"+C),E=f.after(D).detach().removeClass(C)),b.updateStatus("ready")}else b.updateStatus("error",e.tNotFound),f=a("<div>");return c.inlineElement=f,f}return b.updateStatus("ready"),b._parseMarkup(d,{},c),d}}});var H,I="ajax",J=function(){H&&a(document.body).removeClass(H)},K=function(){J(),b.req&&b.req.abort()};a.magnificPopup.registerModule(I,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'<a href="%url%">The content</a> could not be loaded.'},proto:{initAjax:function(){b.types.push(I),H=b.st.ajax.cursor,w(h+"."+I,K),w("BeforeChange."+I,K)},getAjax:function(c){H&&a(document.body).addClass(H),b.updateStatus("loading");var d=a.extend({url:c.src,success:function(d,e,f){var g={data:d,xhr:f};y("ParseAjax",g),b.appendContent(a(g.data),I),c.finished=!0,J(),b._setFocus(),setTimeout(function(){b.wrap.addClass(q)},16),b.updateStatus("ready"),y("AjaxContentAdded")},error:function(){J(),c.finished=c.loadError=!0,b.updateStatus("error",b.st.ajax.tError.replace("%url%",c.src))}},b.st.ajax.settings);return b.req=a.ajax(d),""}}});var L,M=function(c){if(c.data&&void 0!==c.data.title)return c.data.title;
1657var d=b.st.image.titleSrc;if(d){if(a.isFunction(d))return d.call(b,c);if(c.el)return c.el.attr(d)||""}return""};a.magnificPopup.registerModule("image",{options:{markup:'<div class="mfp-figure"><div class="mfp-close"></div><figure><div class="mfp-img"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></div>',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'<a href="%url%">The image</a> could not be loaded.'},proto:{initImage:function(){var c=b.st.image,d=".image";b.types.push("image"),w(m+d,function(){"image"===b.currItem.type&&c.cursor&&a(document.body).addClass(c.cursor)}),w(h+d,function(){c.cursor&&a(document.body).removeClass(c.cursor),v.off("resize"+p)}),w("Resize"+d,b.resizeImage),b.isLowIE&&w("AfterChange",b.resizeImage)},resizeImage:function(){var a=b.currItem;if(a&&a.img&&b.st.image.verticalFit){var c=0;b.isLowIE&&(c=parseInt(a.img.css("padding-top"),10)+parseInt(a.img.css("padding-bottom"),10)),a.img.css("max-height",b.wH-c)}},_onImageHasSize:function(a){a.img&&(a.hasSize=!0,L&&clearInterval(L),a.isCheckingImgSize=!1,y("ImageHasSize",a),a.imgHidden&&(b.content&&b.content.removeClass("mfp-loading"),a.imgHidden=!1))},findImageSize:function(a){var c=0,d=a.img[0],e=function(f){L&&clearInterval(L),L=setInterval(function(){return d.naturalWidth>0?void b._onImageHasSize(a):(c>200&&clearInterval(L),c++,void(3===c?e(10):40===c?e(50):100===c&&e(500)))},f)};e(1)},getImage:function(c,d){var e=0,f=function(){c&&(c.img[0].complete?(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("ready")),c.hasSize=!0,c.loaded=!0,y("ImageLoadComplete")):(e++,200>e?setTimeout(f,100):g()))},g=function(){c&&(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("error",h.tError.replace("%url%",c.src))),c.hasSize=!0,c.loaded=!0,c.loadError=!0)},h=b.st.image,i=d.find(".mfp-img");if(i.length){var j=document.createElement("img");j.className="mfp-img",c.el&&c.el.find("img").length&&(j.alt=c.el.find("img").attr("alt")),c.img=a(j).on("load.mfploader",f).on("error.mfploader",g),j.src=c.src,i.is("img")&&(c.img=c.img.clone()),j=c.img[0],j.naturalWidth>0?c.hasSize=!0:j.width||(c.hasSize=!1)}return b._parseMarkup(d,{title:M(c),img_replaceWith:c.img},c),b.resizeImage(),c.hasSize?(L&&clearInterval(L),c.loadError?(d.addClass("mfp-loading"),b.updateStatus("error",h.tError.replace("%url%",c.src))):(d.removeClass("mfp-loading"),b.updateStatus("ready")),d):(b.updateStatus("loading"),c.loading=!0,c.hasSize||(c.imgHidden=!0,d.addClass("mfp-loading"),b.findImageSize(c)),d)}}});var N,O=function(){return void 0===N&&(N=void 0!==document.createElement("p").style.MozTransform),N};a.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(a){return a.is("img")?a:a.find("img")}},proto:{initZoom:function(){var a,c=b.st.zoom,d=".zoom";if(c.enabled&&b.supportsTransition){var e,f,g=c.duration,j=function(a){var b=a.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),d="all "+c.duration/1e3+"s "+c.easing,e={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},f="transition";return e["-webkit-"+f]=e["-moz-"+f]=e["-o-"+f]=e[f]=d,b.css(e),b},k=function(){b.content.css("visibility","visible")};w("BuildControls"+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.content.css("visibility","hidden"),a=b._getItemToZoom(),!a)return void k();f=j(a),f.css(b._getOffset()),b.wrap.append(f),e=setTimeout(function(){f.css(b._getOffset(!0)),e=setTimeout(function(){k(),setTimeout(function(){f.remove(),a=f=null,y("ZoomAnimationEnded")},16)},g)},16)}}),w(i+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.st.removalDelay=g,!a){if(a=b._getItemToZoom(),!a)return;f=j(a)}f.css(b._getOffset(!0)),b.wrap.append(f),b.content.css("visibility","hidden"),setTimeout(function(){f.css(b._getOffset())},16)}}),w(h+d,function(){b._allowZoom()&&(k(),f&&f.remove(),a=null)})}},_allowZoom:function(){return"image"===b.currItem.type},_getItemToZoom:function(){return b.currItem.hasSize?b.currItem.img:!1},_getOffset:function(c){var d;d=c?b.currItem.img:b.st.zoom.opener(b.currItem.el||b.currItem);var e=d.offset(),f=parseInt(d.css("padding-top"),10),g=parseInt(d.css("padding-bottom"),10);e.top-=a(window).scrollTop()-f;var h={width:d.width(),height:(u?d.innerHeight():d[0].offsetHeight)-g-f};return O()?h["-moz-transform"]=h.transform="translate("+e.left+"px,"+e.top+"px)":(h.left=e.left,h.top=e.top),h}}});
1657var P="iframe",Q="//about:blank",R=function(a){if(b.currTemplate[P]){var c=b.currTemplate[P].find("iframe");c.length&&(a||(c[0].src=Q),b.isIE8&&c.css("display",a?"block":"none"))}};a.magnificPopup.registerModule(P,{options:{markup:'<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe></div>',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){b.types.push(P),w("BeforeChange",function(a,b,c){b!==c&&(b===P?R():c===P&&R(!0))}),w(h+"."+P,function(){R()})},getIframe:function(c,d){var e=c.src,f=b.st.iframe;a.each(f.patterns,function(){return e.indexOf(this.index)>-1?(this.id&&(e="string"==typeof this.id?e.substr(e.lastIndexOf(this.id)+this.id.length,e.length):this.id.call(this,e)),e=this.src.replace("%id%",e),!1):void 0});var g={};return f.srcAction&&(g[f.srcAction]=e),b._parseMarkup(d,g,c),b.updateStatus("ready"),d}}});var S=function(a){var c=b.items.length;return a>c-1?a-c:0>a?c+a:a},T=function(a,b,c){return a.replace(/%curr%/gi,b+1).replace(/%total%/gi,c)};a.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var c=b.st.gallery,e=".mfp-gallery",g=Boolean(a.fn.mfpFastClick);return b.direction=!0,c&&c.enabled?(f+=" mfp-gallery",w(m+e,function(){c.navigateByImgClick&&b.wrap.on("click"+e,".mfp-img",function(){return b.items.length>1?(b.next(),!1):void 0}),d.on("keydown"+e,function(a){37===a.keyCode?b.prev():39===a.keyCode&&b.next()})}),w("UpdateStatus"+e,function(a,c){c.text&&(c.text=T(c.text,b.currItem.index,b.items.length))}),w(l+e,function(a,d,e,f){var g=b.items.length;e.counter=g>1?T(c.tCounter,f.index,g):""}),w("BuildControls"+e,function(){if(b.items.length>1&&c.arrows&&!b.arrowLeft){var d=c.arrowMarkup,e=b.arrowLeft=a(d.replace(/%title%/gi,c.tPrev).replace(/%dir%/gi,"left")).addClass(s),f=b.arrowRight=a(d.replace(/%title%/gi,c.tNext).replace(/%dir%/gi,"right")).addClass(s),h=g?"mfpFastClick":"click";e[h](function(){b.prev()}),f[h](function(){b.next()}),b.isIE7&&(x("b",e[0],!1,!0),x("a",e[0],!1,!0),x("b",f[0],!1,!0),x("a",f[0],!1,!0)),b.container.append(e.add(f))}}),w(n+e,function(){b._preloadTimeout&&clearTimeout(b._preloadTimeout),b._preloadTimeout=setTimeout(function(){b.preloadNearbyImages(),b._preloadTimeout=null},16)}),void w(h+e,function(){d.off(e),b.wrap.off("click"+e),b.arrowLeft&&g&&b.arrowLeft.add(b.arrowRight).destroyMfpFastClick(),b.arrowRight=b.arrowLeft=null})):!1},next:function(){b.direction=!0,b.index=S(b.index+1),b.updateItemHTML()},prev:function(){b.direction=!1,b.index=S(b.index-1),b.updateItemHTML()},goTo:function(a){b.direction=a>=b.index,b.index=a,b.updateItemHTML()},preloadNearbyImages:function(){var a,c=b.st.gallery.preload,d=Math.min(c[0],b.items.length),e=Math.min(c[1],b.items.length);for(a=1;a<=(b.direction?e:d);a++)b._preloadItem(b.index+a);for(a=1;a<=(b.direction?d:e);a++)b._preloadItem(b.index-a)},_preloadItem:function(c){if(c=S(c),!b.items[c].preloaded){var d=b.items[c];d.parsed||(d=b.parseEl(c)),y("LazyLoad",d),"image"===d.type&&(d.img=a('<img class="mfp-img" />').on("load.mfploader",function(){d.hasSize=!0}).on("error.mfploader",function(){d.hasSize=!0,d.loadError=!0,y("LazyLoadError",d)}).attr("src",d.src)),d.preloaded=!0}}}});var U="retina";a.magnificPopup.registerModule(U,{options:{replaceSrc:function(a){return a.src.replace(/\.\w+$/,function(a){return"@2x"+a})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var a=b.st.retina,c=a.ratio;c=isNaN(c)?c():c,c>1&&(w("ImageHasSize."+U,function(a,b){b.img.css({"max-width":b.img[0].naturalWidth/c,width:"100%"})}),w("ElementParse."+U,function(b,d){d.src=a.replaceSrc(d,c)}))}}}}),function(){var b=1e3,c="ontouchstart"in window,d=function(){v.off("touchmove"+f+" touchend"+f)},e="mfpFastClick",f="."+e;a.fn.mfpFastClick=function(e){return a(this).each(function(){var g,h=a(this);if(c){var i,j,k,l,m,n;h.on("touchstart"+f,function(a){l=!1,n=1,m=a.originalEvent?a.originalEvent.touches[0]:a.touches[0],j=m.clientX,k=m.clientY,v.on("touchmove"+f,function(a){m=a.originalEvent?a.originalEvent.touches:a.touches,n=m.length,m=m[0],(Math.abs(m.clientX-j)>10||Math.abs(m.clientY-k)>10)&&(l=!0,d())}).on("touchend"+f,function(a){d(),l||n>1||(g=!0,a.preventDefault(),clearTimeout(i),i=setTimeout(function(){g=!1},b),e())})})}h.on("click"+f,function(){g||e()})})},a.fn.destroyMfpFastClick=function(){a(this).off("touchstart"+f+" click"+f),c&&v.off("touchmove"+f+" touchend"+f)}}(),A()}); 1658 1659/** 1660 * jQuery.marquee - scrolling text like old marquee element 1661 * @author Aamir Afridi - aamirafridi(at)gmail(dot)com / http://aamirafridi.com/jquery/jquery-marquee-plugin 1662 */ 1663;(function(e){e.fn.marquee=function(t){return this.each(function(){var n=e.extend({},e.fn.marquee.defaults,t),r=e(this),i,s,o,u,a,f=3,l="animation-play-state",c=false,h=function(e,t,n){var r=["webkit","moz","MS","o",""];for(var i=0;i<r.length;i++){if(!r[i])t=t.toLowerCase();e.addEventListener(r[i]+t,n,false)}},p=function(e){var t=[];for(var n in e){if(e.hasOwnProperty(n)){t.push(n+":"+e[n])}}t.push();return"{"+t.join(",")+"}"}
1663,d=function(){r.timer=setTimeout(M,n.delayBeforeStart)},v={pause:function(){if(c&&n.allowCss3Support){i.css(l,"paused")}else{if(e.fn.pause){i.pause()}}r.data("runningStatus","paused");r.trigger("paused")},resume:function(){if(c&&n.allowCss3Support){i.css(l,"running")}else{if(e.fn.resume){i.resume()}}r.data("runningStatus","resumed");r.trigger("resumed")},toggle:function(){v[r.data("runningStatus")=="resumed"?"pause":"resume"]()},destroy:function(){clearTimeout(r.timer);r.find("*").andSelf().unbind();r.html(r.find(".js-marquee:first").html())}};if(typeof t==="string"){if(e.isFunction(v[t])){if(!i){i=r.find(".js-marquee-wrapper")}if(r.data("css3AnimationIsSupported")===true){c=true}v[t]()}return}var m={},g;e.each(n,function(e,t){g=r.attr("data-"+e);if(typeof g!=="undefined"){switch(g){case"true":g=true;break;case"false":g=false;break}n[e]=g}});n.duration=n.speed||n.duration;u=n.direction=="up"||n.direction=="down";n.gap=n.duplicated?parseInt(n.gap):0;r.wrapInner('<div class="js-marquee"></div>');var y=r.find(".js-marquee").css({"margin-right":n.gap,"float":"left"});if(n.duplicated){y.clone(true).appendTo(r)}r.wrapInner('<div style="width:100000px" class="js-marquee-wrapper"></div>');i=r.find(".js-marquee-wrapper");if(u){var b=r.height();i.removeAttr("style");r.height(b);r.find(".js-marquee").css({"float":"none","margin-bottom":n.gap,"margin-right":0});if(n.duplicated)r.find(".js-marquee:last").css({"margin-bottom":0});var w=r.find(".js-marquee:first").height()+n.gap;n.duration=(parseInt(w,10)+parseInt(b,10))/parseInt(b,10)*n.duration}else{a=r.find(".js-marquee:first").width()+n.gap;s=r.width();n.duration=(parseInt(a,10)+parseInt(s,10))/parseInt(s,10)*n.duration}if(n.duplicated){n.duration=n.duration/2}if(n.allowCss3Support){var E=document.body||document.createElement("div"),S="marqueeAnimation-"+Math.floor(Math.random()*1e7),x="Webkit Moz O ms Khtml".split(" "),T="animation",N="",C="";if(E.style.animation){C="@keyframes "+S+" ";c=true}if(c===false){for(var k=0;k<x.length;k++){if(E.style[x[k]+"AnimationName"]!==undefined){var L="-"+x[k].toLowerCase()+"-";T=L+T;l=L+l;C="@"+L+"keyframes "+S+" ";c=true;break}}}if(c){N=S+" "+n.duration/1e3+"s "+n.delayBeforeStart/1e3+"s infinite "+n.css3easing;r.data("css3AnimationIsSupported",true)}}var A=function(){i.css("margin-top",n.direction=="up"?b+"px":"-"+w+"px")},O=function(){i.css("margin-left",n.direction=="left"?s+"px":"-"+a+"px")};if(n.duplicated){if(u){i.css("margin-top",n.direction=="up"?b:"-"+(w*2-n.gap)+"px")}else{i.css("margin-left",n.direction=="left"?s+"px":"-"+(a*2-n.gap)+"px")}f=1}else{if(u){A()}else{O()}}var M=function(){if(n.duplicated){if(f===1){n._originalDuration=n.duration;if(u){n.duration=n.direction=="up"?n.duration+b/(w/n.duration):n.duration*2}else{n.duration=n.direction=="left"?n.duration+s/(a/n.duration):n.duration*2}if(N){N=S+" "+n.duration/1e3+"s "+n.delayBeforeStart/1e3+"s "+n.css3easing}f++}else if(f===2){n.duration=n._originalDuration;if(N){S=S+"0";C=e.trim(C)+"0 ";N=S+" "+n.duration/1e3+"s 0s infinite "+n.css3easing}f++}}if(u){if(n.duplicated){if(f>2){i.css("margin-top",n.direction=="up"?0:"-"+w+"px")}o={"margin-top":n.direction=="up"?"-"+w+"px":0}}else{A();o={"margin-top":n.direction=="up"?"-"+i.height()+"px":b+"px"}}}else{if(n.duplicated){if(f>2){i.css("margin-left",n.direction=="left"?0:"-"+a+"px")}o={"margin-left":n.direction=="left"?"-"+a+"px":0}}else{O();o={"margin-left":n.direction=="left"?"-"+a+"px":s+"px"}}}r.trigger("beforeStarting");if(c){i.css(T,N);var t=C+" { 100% "+p(o)+"}",l=e("style");if(l.length!==0){l.filter(":last").append(t)}else{e("head").append("<style>"+t+"</style>")}h(i[0],"AnimationIteration",function(){r.trigger("finished")});h(i[0],"AnimationEnd",function(){M();r.trigger("finished")})}else{i.animate(o,n.duration,n.easing,function(){r.trigger("finished");if(n.pauseOnCycle){d()}else{M()}})}r.data("runningStatus","resumed")};r.bind("pause",v.pause);r.bind("resume",v.resume);if(n.pauseOnHover){r.bind("mouseenter mouseleave",v.toggle)}if(c&&n.allowCss3Support){M()}else{d()}})};e.fn.marquee.defaults={allowCss3Support:true,css3easing:"linear",easing:"linear",delayBeforeStart:1e3,direction:"left",duplicated:false,duration:5e3,gap:20,pauseOnCycle:false,pauseOnHover:false}})(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.