1;(function($) { 2 var $is_popup = 0, current_popup = '', $is_slider = 0, leavepop = 0; 3 4 var pgIframes = {}; 5 var circleSeconds = {}; 6 var circleMinutes = {}; 7 var circleHours = {}; 8 var circleDays = {}; 9 10 var layerSeconds = {}; 11 var layerMinutes = {}; 12 var layerHours = {}; 13 var layerDays = {}; 14 15 var circleBgSeconds = {}; 16 var circleBgMinutes = {}; 17 var circleBgHours = {}; 18 var circleBgDays = {}; 19 20 var layerBgSeconds = {}; 21 var layerBgMinutes = {}; 22 var layerBgHours = {}; 23 var layerBgDays = {}; 24 25 var circularTime = {}; 26 27 // Powered By 28 if ( powered_by == 'yes' ) { 29 if ( !$('#ib2-powered-by').length ) { 30 var aff_url = powered_by_link; 31 32 if ( aff_url == '' ) aff_url = 'http://instabuilder.com'; 33 $('#entire_wrapper').append('<div id="ib2-powered-by"><a href="' + aff_url + '" target="_blank"><img src="' + powered_img + '" class="img-responsive" /></a></div>'); 34 } 35 } else { 36 if ( $('#ib2-powered-by').length ) { 37 $('#ib2-powered-by').remove(); 38 } 39 } 40 41 // Adjust font size for mobile 42 $('p').find('span').each(function(){ 43 var ps = $(this), origFont = ps.css('fontSize').replace(/px/gi, ''); 44 if ( origFont > 18 && $(window).width() <= 480 ) { 45 var newSize = 0.7 * origFont; 46 ps.css('font-size', newSize + 'px'); 47 } 48 }); 49 50 $(window).load(function(){ 51 // Fix TwentyFifteen CSS conflict 52 $('#twentyfifteen-style-css').remove(); 53 $('#twentyfifteen-fonts-css').remove(); 54 $('#twentyfifteen-ie-css').remove(); 55 $('#twentyfifteen-ie7-css').remove(); 56 57 // Date Elements 58 if ( $('.ib2-date-el').length ) { 59 $('.ib2-date-el').each(function(){ 60 var d = $(this), format = d.data('format'), offset = d.data('tz'); 61 62 d.text(moment().tz(offset).format(format)); 63 }); 64 } 65 66 // Try to fix sub-menu display 67 if ( $('.ib2-section-el').length ) { 68 var zindex = 999; 69 $('.ib2-section-el').each(function(i){ 70 var sec = $(this); 71 72 if ( !sec.find('.ib2-navi').length ) return true; 73 74 sec.css('z-index', zindex); 75 76 zindex = zindex - 1; 77 78 }); 79 } 80 // Fix Webinar form URL 81 if ( $('form').length ) { 82 $('form').each(function(i){ 83 var f = $(this); 84 if ( f.find('input[name=_webinar_key]').length ) { 85 f.attr('action', webinar_url); 86 } 87 }); 88 } 89 90 // Fix Video 91 if ( $('.ib2-video-container').length ) { 92 $('.ib2-video-container').each(function(i){ 93 var v = $(this); 94 if ( v.find('script').length ) { 95 v.find('.embed-responsive').removeClass('embed-responsive embed-responsive-16by9'); 96 } 97 }); 98 } 99 100 // remove unnecessary elements 101 $('.gr-textarea-btn').parent().remove(); 102 $('.gr-textarea-btn').remove(); 103 104 // unused menu button... 105 $('button.ib2-navbar-toggle').remove(); 106 107 $('[id]').each(function (i) { 108 var ids = $('[id="' + this.id + '"]'); 109 if ( ids.length > 1 ) $('[id="' + this.id + '"]:gt(0)').remove(); 110 }); 111 112 if ( $('.ib2-menu-el').length ) { 113 $('.ib2-menu-el').each(function(i){ 114 var m = $(this), menu = m.data('menu'), style = m.data('style'), 115 id = m.attr('id'); 116 117 if ( menu == 'none' || m.hasClass('ib2-new-navi') || m.hasClass('ib2-updated-navi') ) return true; 118 119 $.post(ib2ajaxurl, { 120 action: 'update_menu', 121 menu: menu, 122 style: style, 123 menu_id: id 124 }, function(response){ 125 if ( response.success ) { 126 m.find('nav').html(response.output); 127 } 128 }); 129 }); 130 } 131 }); 132 133 // ================== VIDEO BACKGROUND CONTROL ====================== 134 $('body').on('click', '.bgvid-play', function(e) { // play button 135 e.preventDefault(); 136 player.playVideo(); 137 }).on('click', '.bgvid-pause', function(e) { // pause button 138 e.preventDefault(); 139 player.pauseVideo(); 140 }).on('click', '.bgvid-mute', function(e) { // mute button 141 e.preventDefault(); 142 (player.isMuted()) ? player.unMute() : player.mute(); 143 }).on('click', '.bgvid-volume-down', function(e) { // volume down button 144 e.preventDefault(); 145 var currentVolume = player.getVolume(); 146 if (currentVolume < 10) currentVolume = 10; 147 player.setVolume(currentVolume - 10); 148 }).on('click', '.bgvid-volume-up', function(e) { // volume up button 149 e.preventDefault(); 150 if (player.isMuted()) player.unMute(); // if mute is on, unmute 151 var currentVolume = player.getVolume(); 152 if (currentVolume > 100 - 10) currentVolume = 100 - 10; 153 player.setVolume(currentVolume + 10); 154 }); 155 156 $('#entire_wrapper').on('click', '.bgvid-pause', function(e){ 157 $('.ib2-tube-play').show(); 158 $('.ib2-tube-pause').hide(); 159 e.preventDefault(); 160 }); 161 162 $('#entire_wrapper').on('click', '.bgvid-play', function(e){ 163 $('.ib2-tube-play').hide(); 164 $('.ib2-tube-pause').show(); 165 e.preventDefault(); 166 }); 167 168 $('#entire_wrapper').on('click', '.bgvid-volume-up', function(e){ 169 var curvol = player.getVolume(); 170 if ( curvol >= 1 ) { 171 $('li.ib2-tube-mute a').css('background-position', 'left top'); 172 $('.tubular-mute').data('mute', 'no'); 173 $('.tubular-mute').attr('data-mute', 'no'); 174 } 175 e.preventDefault(); 176 }); 177 178 $('#entire_wrapper').on('click', '.bgvid-volume-down', function(e){ 179 var curvol = player.getVolume(); 180 if ( curvol <= 0 ) { 181 $('li.ib2-tube-mute a').css('background-position', 'left bottom'); 182 $('.tubular-mute').data('mute', 'yes'); 183 $('.tubular-mute').attr('data-mute', 'yes'); 184 } 185 e.preventDefault(); 186 }); 187 188 $('#entire_wrapper').on('click', '.bgvid-mute', function(e){ 189 var $this = $(this); 190 if ( $this.data("mute") == 'yes' ) { 191 $('li.ib2-tube-mute a').css('background-position', 'left top'); 192 $this.data('mute', 'no'); 193 $this.attr('data-mute', 'no'); 194 } else { 195 $('li.ib2-tube-mute a').css('background-position', 'left bottom'); 196 $this.data('mute', 'yes'); 197 $this.attr('data-mute', 'yes'); 198 } 199 e.preventDefault(); 200 }); 201 202 // ================== ATTENTION BAR ====================== 203 204 if ( ib2_attbar == 0 ) { 205 $('body').css('paddingTop', '0px'); 206 } else { 207 var attHeight = $('.ib2-notification-text').outerHeight() - 2; 208 $('body').css('paddingTop', attHeight + 'px'); 209 } 210 211 $('label[for*="nb-hide"]').click(function(e){ 212 $('body').css('paddingTop', '0px'); 213 }); 214 215 $('label[for*="nb-show"]').click(function(e){ 216 var attHeight = $('.ib2-notification-text').outerHeight() - 2; 217 $('body').css('paddingTop', attHeight + 'px'); 218 }); 219 220 // ================== 3 STEPS OPTIN ====================== 221 $('a[href*="#go-to-step-2"]').click(function(e){
222 var hw = $('.ib2-section-slide-1').outerWidth(); 223 $('.ib2-section-slide-1').hide({ 224 direction: 'left', distance: hw 225 }); 226 $('.ib2-section-slide-2').show("bounce", {}, 500); 227 e.preventDefault(); 228 }); 229 230 $('a[href*="#go-to-step-3"]').click(function(e){ 231 var hw = $('.ib2-section-slide-2').outerWidth(); 232 $('.ib2-section-slide-2').hide({ 233 direction: 'left', distance: hw 234 }); 235 $('.ib2-section-slide-3').show("bounce", {}, 500); 236 e.preventDefault(); 237 }); 238 239 // ================== DELAY & ANIMATION ====================== 240 if ( $('.ib2-box-delay').length ) { 241 $('.ib2-box-delay').each(function(){ 242 var b = $(this), id = b.attr('id'), 243 delay = b.data('delay').split(":"), 244 hour = parseInt(delay[0]), min = parseInt(delay[1]), 245 secs = parseInt(delay[2]), 246 anim = b.data('animation'), 247 options = {}; 248 249 hour = hour * 60 * 60; 250 min = min * 60; 251 252 var hold = (hour + min + secs) * 1000; 253 254 eldelay = setTimeout(function(){ 255 if ( anim == 'none' ) { 256 $('#' + id).removeClass('ib2-box-delay'); 257 } else { 258 effectClass = animation_map(anim); 259 $('#' + id).removeClass('ib2-box-delay'); 260 261 $('#' + id).removeClass('ib2-box-animation') 262 .addClass('animated ' + effectClass); 263 } 264 }, hold); 265 }); 266 } 267 268 var animWinHeight = $(window).height(); 269 if ( $('.ib2-text-animation, .ib2-box-animation').length ) { 270 var currentTop = $(window).scrollTop(); 271 $('.ib2-text-animation, .ib2-box-animation').each(function(){ 272 var te = $(this), id = te.attr('id'), anim = $('#' + id).data('animation'); 273 274 if ( currentTop < 10 && ( $('#' + id).offset().top < (animWinHeight*0.75) ) ) { 275 effectClass = animation_map(anim); 276 te.removeClass('ib2-text-animation ib2-box-animation') 277 .addClass('animated ' + effectClass); 278 } 279 }); 280 } 281 282 $(window).scroll(function () { 283 var winPos = $(window).scrollTop(); 284 if ( $('.ib2-text-animation, .ib2-box-animation').length ) { 285 $('.ib2-text-animation, .ib2-box-animation').each(function(){ 286 var te = $(this), offset = te.offset(), 287 id = te.attr('id'), anim = te.data('animation'); 288 if ( te.hasClass('animated') ) return true; 289 if ( te.hasClass('ib2-box-delay') ) return true; 290 if ( te.hasClass('ib2-popup') ) return true; 291 if ( te.hasClass('ib2-slider-el') ) return true; 292 293 if ( te.offset().top < winPos + (animWinHeight*0.75) ) { 294 effectClass = animation_map(anim); 295 te.removeClass('ib2-text-animation ib2-box-animation') 296 .addClass('animated ' + effectClass); 297 } 298 }); 299 } 300 }); 301 302 // ================== QUIZ ====================== 303 304 if ( $('.answers-radio').length ) { 305 $('.answers-radio').each(function(){ 306 var id = $(this).attr('id'); 307 $(this).prettyCheckable(); 308 309 $('body').on('change', '#' + id, function(){ 310 var $this = $(this), answer = $this.val(), 311 parts = $this.attr('id').split('_'), 312 q = parts[1]; 313 314 if ( $this.is(":checked") ) { 315 $('.quiz-loader').show(); 316 $('.ib2-quiz-el').css('opacity', '0.6'); 317 318 var prnt = $this.parent().parent().parent(), 319 prnt_id = prnt.attr('id'), 320 elID = prnt_id.replace('-' + q + '-answers', ''); 321 322 $.post(ib2ajaxurl, { 323 action: 'quiz_answer', 324 question: q, 325 answer: answer 326 }, function(response){ 327 if ( response.success ) { 328 $('.ib2-quiz-page').hide(); 329 $('#' + prnt_id).parent().next('.ib2-quiz-page').show(); 330 } 331 332 $('.quiz-loader').hide(); 333 $('.ib2-quiz-el').css('opacity', '1.0'); 334 }); 335 } 336 }); 337 }); 338 } 339 340 if ( $('.ib2-quiz-el').length ) { 341 $('.ib2-quiz-el').append('<div class="quiz-loader" style="display:none"><i class="fa fa-spinner fa-spin fa-2x"></i></div>'); 342 343 var qtop = (($('.ib2-quiz-el').height() / 2) - ($('.quiz-loader > i').height() / 2)); 344 var qleft = (($('.ib2-quiz-el').width() / 2) - ($('.quiz-loader > i').width() / 2)); 345 346 if ( qtop < 0 ) qtop = 0; 347 if ( qleft < 0 ) qleft = 0; 348 349 $('.quiz-loader').css({ 350 'position': 'absolute', 351 'top': qtop, 352 'left': qleft, 353 'opacity': '1.0' 354 }); 355 } 356 357 // FIX VIDEO PROBLEM ON CHROME 358 $(window).load(function(){ 359 if ( $("iframe").length ) { 360 $("iframe").each(function(i){ 361 var iv = $(this); 362 if ( iv.is(":visible") && iv.data('autoplay') == 'yes' ) { 363 var src = iv.attr('src'); 364 if ( src != '' && src != 'http://instabuilder.com' ) { 365 src += '&autoplay=1'; 366 iv.attr('src', src); 367 } 368 } 369 }); 370 } 371 }); 372 373 // FIX HEIGHT FOX CODE ELEMENT 374 if ( $('.ib2-code-el').length ) { 375 $('.ib2-code-el').each(function(){ 376 var tc = $(this), h = tc.css('height').replace(/px/gi, ''); 377 378 tc.css({ 379 'height': 'auto', 380 'min-height': h + 'px' 381 }); 382 383 tc.find('.el-content').css({ 384 'height': 'auto', 385 'min-height': h + 'px' 386 }); 387 }); 388 } 389 390 // ================== POP UP ====================== 391 if ( ib2_popup == 1 ) { 392 if ( ib2_poptime != 'unfocus' ) { 393 $(window).load(function(){ 394 var options = {}, anim = '', animate = false;
395 if ( $is_popup == 1 ) return false; 396 397 if ( $('#' + ib2_popid + '-popup').hasClass('ib2-box-animation') && $('#' + ib2_popid + '-popup').attr('data-animation') ) { 398 anim = $('#' + ib2_popid + '-popup').data('animation'); 399 animate = true; 400 } 401 402 ib2_popup_center( $('#' + ib2_popid + '-popup') ); 403 404 if ( anim === "scale" ) { 405 options = { percent: 100 }; 406 } 407 408 if ( $("iframe").length ) { 409 $("iframe").each(function(i){ 410 var iv = $(this); 411 if ( iv.is(":visible") && iv.data('autoplay') == 'yes' ) { 412 var src = iv.attr('src'); 413 src.replace('&autoplay=1', ''); 414 iv.attr('src', src); 415 } 416 }); 417 } 418 419 if ( animate == true ) { 420 window.setTimeout(function(){ 421 $('.ib2-popup-bg').fadeIn("medium"); 422 $('#' + ib2_popid + '-popup').show(anim, options, 500); 423 }, 1000); 424 } else { 425 $('#' + ib2_popid + '-popup').fadeIn("slow"); 426 } 427 428 if ( $('#' + ib2_popid + '-popup').find("iframe").length ) { 429 $('#' + ib2_popid + '-popup').find("iframe").each(function(i){ 430 var iv = $(this); 431 if ( iv.is(":visible") && iv.data('autoplay') == 'yes' ) { 432 var src = iv.attr('src') + '&autoplay=1'; 433 iv.attr('src', src); 434 } 435 }); 436 } 437 438 $is_popup = 1; 439 current_popup = ib2_popid; 440 }); 441 } else { 442 $('body').mouseleave(function(){ 443 var options = {}, anim = '', animate = false; 444 if ( $is_popup == 1 || leavepop == 1 ) return false; 445 446 if ( $('#' + ib2_popid + '-popup').hasClass('ib2-box-animation') && $('#' + ib2_popid + '-popup').attr('data-animation') ) { 447 anim = $('#' + ib2_popid + '-popup').data('animation'); 448 animate = true; 449 } 450 451 if ( $("iframe").length ) { 452 $("iframe").each(function(i){ 453 var iv = $(this); 454 if ( iv.is(":visible") && iv.data('autoplay') == 'yes' ) { 455 var src = iv.attr('src'); 456 src.replace('&autoplay=1', ''); 457 iv.attr('src', src); 458 } 459 }); 460 } 461 462 ib2_popup_center( $('#' + ib2_popid + '-popup') ); 463 464 if ( anim === "scale" ) { 465 options = { percent: 100 }; 466 } 467 468 $('.ib2-popup-bg').fadeIn("medium"); 469 470 if ( animate == true ) { 471 window.setTimeout(function(){ 472 $('#' + ib2_popid + '-popup').show(anim, options, 500); 473 }, 500); 474 } else { 475 $('#' + ib2_popid + '-popup').fadeIn("slow"); 476 } 477 478 if ( $('#' + ib2_popid + '-popup').find("iframe").length ) { 479 $('#' + ib2_popid + '-popup').find("iframe").each(function(i){ 480 var iv = $(this); 481 if ( iv.is(":visible") && iv.data('autoplay') == 'yes' ) { 482 var src = iv.attr('src') + '&autoplay=1'; 483 iv.attr('src', src); 484 } 485 }); 486 } 487 488 leavepop = 1; 489 $is_popup = 1; 490 current_popup = ib2_popid; 491 }); 492 } 493 } 494 495 $('.open-popup, .ib2-open-popup').each(function(){ 496 $(this).click(function(e){ 497 e.preventDefault(); 498 499 var $this = $(this), options = {}, 500 anim = '', animate = false, 501 elID = $this.parent().parent().attr('id'); 502 503 var popId = '#' + elID + '-popup'; 504 if ( $(popId).hasClass('ib2-box-animation') && $(popId).attr('data-animation') ) { 505 anim = $(popId).data('animation'); 506 animate = true; 507 } 508 509 if ( $is_popup == 1 ) return false; 510 511 if ( $("iframe").length ) { 512 $("iframe").each(function(i){ 513 var iv = $(this); 514 if ( iv.is(":visible") && iv.data('autoplay') == 'yes' ) { 515 var src = iv.attr('src'); 516 src = src.replace('&autoplay=1', ''); 517 iv.attr('src', src); 518 } 519 }); 520 } 521 522 ib2_popup_center( $(popId) ); 523 524 if ( anim === "scale" ) { 525 options = { percent: 100 }; 526 } 527 528 $('.ib2-popup-bg').fadeIn("medium"); 529 530 if ( animate == true ) { 531 window.setTimeout(function(){ 532 $(popId).show(anim, options, 500); 533 }, 500); 534 } else { 535 $(popId).fadeIn("slow"); 536 } 537 538 if ( $(popId).find("iframe").length ) { 539 $(popId).find("iframe").each(function(i){ 540 var iv = $(this); 541 if ( iv.is(":visible") && iv.data('autoplay') == 'yes' ) { 542 var src = iv.attr('src') + '&autoplay=1'; 543 iv.attr('src', src); 544 } 545 }); 546 } 547 548 $is_popup = 1; 549 current_popup = elID; 550 551 }); 552 }); 553 554 $('body').on('click', '.ib2-close-pop', function(e){ 555 $('body').trigger('popupclose'); 556 e.preventDefault(); 557 }); 558 559 $(document).keyup(function(e) { 560 if ( e.keyCode == 27 && $is_popup == 1 ) { 561 $('body').trigger('popupclose'); 562 } 563 }); 564 565 $('body').on('click', '.ib2-popup-bg', function(e){ 566 $('body').trigger('popupclose'); 567 }); 568 569 $('body').on('popupclose', function(){ 570 var elID = current_popup; 571 572 $('.ib2-popup-bg').fadeOut("medium"); 573 $('#' + elID + '-popup, .ib2-popup').fadeOut("medium"); 574 575 if ( $('#' + elID + '-popup').find("iframe").length ) { 576 $('#' + elID + '-popup').find("iframe").each(function(i){ 577 var iv = $(this); 578 var src = iv.attr('src'); 579 src = src.replace('&autoplay=1', ''); 580 iv.attr('src', src); 581 }); 582 } 583 584 $is_popup = 0; 585 current_popup = ''; 586 }); 587 588 // ================== HOTSPOT ====================== 589 $('[data-toggle*="tooltip"]').tooltip(); 590 $('[data-toggle*="popover"]').popover(); 591 592 if ( $('[data-toggle*="popup"]').length ) { 593 $('[data-toggle*="popup"]').each(function(){ 594 var $this = $(this), id = $this.attr('id'); 595 if ( $this.data('trigger') == 'hover' ) { 596 $('#' + id).bind('mouseover', function(e){ 597 hotspot_popup(id); 598 }); 599 } else if ( $this.data('trigger') == 'click' ) { 600 $('#' + id).bind('click', function(e){ 601 hotspot_popup(id); 602 603 e.preventDefault(); 604 }); 605 } 606 }); 607 } 608 609 function hotspot_popup( elID ) { 610 var $this = $(this), options = {}, 611 anim = '', animate = false;
612 613 var popId = '#' + elID + '-popup'; 614 if ( $(popId).hasClass('ib2-box-animation') && $(popId).attr('data-animation') ) { 615 anim = $(popId).data('animation'); 616 animate = true; 617 } 618 619 if ( $is_popup == 1 ) return false; 620 621 if ( $("iframe").length ) { 622 $("iframe").each(function(i){ 623 var iv = $(this); 624 if ( iv.is(":visible") && iv.data('autoplay') == 'yes' ) { 625 var src = iv.attr('src'); 626 src = src.replace('&autoplay=1', ''); 627 iv.attr('src', src); 628 } 629 }); 630 } 631 632 ib2_popup_center( $(popId) ); 633 634 if ( anim === "scale" ) { 635 options = { percent: 100 }; 636 } 637 638 $('.ib2-popup-bg').fadeIn("medium"); 639 640 if ( animate == true ) { 641 window.setTimeout(function(){ 642 $(popId).show(anim, options, 500); 643 }, 500); 644 } else { 645 $(popId).fadeIn("slow"); 646 } 647 648 if ( $(popId).find("iframe").length ) { 649 $(popId).find("iframe").each(function(i){ 650 var iv = $(this); 651 if ( iv.is(":visible") && iv.data('autoplay') == 'yes' ) { 652 var src = iv.attr('src') + '&autoplay=1'; 653 iv.attr('src', src); 654 } 655 }); 656 } 657 658 $is_popup = 1; 659 current_popup = elID; 660 } 661 662 // ================== SLIDER ====================== 663 664 if ( ib2_slider == 1 ) { 665 $(window).load(function(){ 666 var options = {}, anim = '', animate = false; 667 if ( $is_slider == 1 ) return false; 668 669 if ( $('#ib2-bottom-slider > .ib2-slider-el').hasClass('ib2-box-animation') && $('#ib2-bottom-slider > .ib2-slider-el').attr('data-animation') ) { 670 anim = $('#ib2-bottom-slider > .ib2-slider-el').data('animation'); 671 animate = true; 672 } 673 674 if ( anim === "scale" ) { 675 options = { percent: 100 }; 676 } 677 678 if ( animate == true ) { 679 $('#ib2-bottom-slider').show(); 680 //$('#ib2-bottom-slider > .ib2-slider-el').show(anim, options, 500); 681 682 var effectClass = animation_map(anim); 683 $('#ib2-bottom-slider > .ib2-slider-el').removeClass('ib2-text-animation ib2-box-animation') 684 .addClass('animated ' + effectClass); 685 } else { 686 $('#ib2-bottom-slider').effect('blind', { direction: 'up', mode: 'show' }, 1000); 687 } 688 689 if ( ib2_slider_close == 0 ) { 690 var sliderCloseHtml = '<button type="button" class="btn btn-danger btn-sm close-bottom-slider"><i class="fa fa-times"></i></button>'; 691 $('.ib2-slider-el > .el-content').prepend(sliderCloseHtml); 692 } 693 694 var marginBottom = parseInt($('#ib2-bottom-slider').outerHeight()), 695 currentMargin = parseInt($('body').css('marginBottom').replace('px', '')); 696 marginBottom = marginBottom + currentMargin + 20; 697 $('body').css('margin-bottom', marginBottom + 'px'); 698 699 $is_slider = 1; 700 }); 701 } 702 703 $('body').on('click', '.close-bottom-slider', function(e){ 704 var $this = $(this), sliderHeight = parseInt($('#ib2-bottom-slider').outerHeight()), 705 marginBottom = parseInt($('body').css('marginBottom').replace('px', '')); 706 707 var currentMargin = (marginBottom - sliderHeight) - 20; 708 if ( currentMargin < 0 ) 709 currentMargin = 0; 710 711 $('#ib2-bottom-slider').effect('slide', { direction: 'down', mode: 'hide' }, 500); 712 $('body').css('margin-bottom', currentMargin + 'px'); 713 714 e.preventDefault(); 715 }); 716 717 // ================== COUNTDOWN ====================== 718 719 $(window).load(function(){ 720 if ( $('.ib2-countdown-el').length ) { 721 $('.ib2-countdown-el').each(function(){ 722 var $this = $(this), mode = $this.data('mode'), 723 target = $this.data('target'), cID = $this.attr('id'), 724 end = $this.data('end'), style = $this.data('style'); 725 726 if ( mode == 'evergreen' || mode == 'cookie' ) { 727 var newDate = new Date().valueOf(), 728 parts = target.split(":"), 729 day = parseInt(parts[0]), 730 hour = parseInt(parts[1]), 731 min = parseInt(parts[2]); 732 733 if ( mode == 'cookie' ) { 734 if ( $.cookie('ib2c-' + post_id) ) { 735 newDate = parseInt($.cookie('ib2c-' + post_id)); 736 } else { 737 var expire = day + 30; 738 $.cookie('ib2c-' + post_id, newDate, { expires: expire, path: '/' }); 739 } 740 } 741 742 var newValue = day + hour + min, target = newDate + newValue; 743 } else { 744 var offset = $this.data('tz'); 745 var origTime = moment.tz(target, offset); 746 var utc = origTime.clone().tz("UTC"); 747 var localTime = moment.utc(utc).toDate(); 748 target = moment(localTime).format('YYYY/MM/DD HH:mm:ss'); 749 } 750 751 var beforeText = '', afterText = ''; 752 if ( style == 'text' ) { 753 beforeText = $('#' + cID).data('before') != '' ? decodeURIComponent($('#' + cID).data('before')) + ' ' : ''; 754 afterText = $('#' + cID).data('after') != '' ? ' ' + decodeURIComponent($('#' + cID).data('after')) : ''; 755 } 756 757 if ( style == 'circular' ) { 758 var format = circular_countdown_format(cID); 759 $('#' + cID).html(format); 760 } else { 761 var format = normal_countdown_format(cID, style); 762 $('#' + cID).html(format); 763 } 764 765 $('#' + cID).countdown(target) 766 .on('update.countdown', function(event) { 767 if ( style == 'circular' ) { 768 // update time object 769 circular_update_timer(cID, event.offset.totalDays, event.offset.hours, event.offset.minutes, event.offset.seconds); 770 771 if ( layerMinutes[cID] ) { 772 circular_draw(cID); 773 } else { 774 create_circular_countdown(cID); 775 } 776 } else { 777 normal_countdown_update(cID, event.offset.totalDays, event.offset.hours, event.offset.minutes, event.offset.seconds); 778 } 779 }) 780 .on('finish.countdown', function(event) { 781 if ( mode == 'cookie' || mode == 'date' ) { 782 if ( end == 'redirect' ) { 783 var url = decodeURIComponent($this.data('url')); 784 if ( url != '' ) { 785 window.location.href = url; 786 } 787 } else if ( end == 'hide' ) { 788 $this.hide(); 789 } else if ( end == 'reveal' ) { 790 $this.hide(); 791 $('#' + cID + '-content').show(); 792 } 793 } 794 }); 795 796 }); 797 } 798 }); 799 // ================== EMAIL VALIDATION ====================== 800 $('.ib2-validate-email').each(function(){ 801 $(this).keyup(function(){ 802 ib2_email_validation($(this)); 803 }); 804 805 $(this).blur(function(){ 806 ib2_email_validation($(this)); 807 }); 808 }); 809 810 $('.ib2-required').each(function(){ 811 $(this).keyup(function(){ 812 ib2_required_validation($(this)); 813 }); 814 815 $(this).blur(function(){ 816 ib2_required_validation($(this)); 817 }); 818 }); 819 820 $('form').each(function(){ 821 $(this).submit(function(e){ 822 var $this = $(this), reqpass = 0; 823 $this.find('.ib2-required').each(function(){ 824 if ( $(this).is(":visible") ) { 825 if ( !ib2_required_validation($(this)) ) reqpass += 1; 826 } 827 }); 828 829 if ( $this.find('.ib2-validate-email').length && $this.find('.ib2-validate-email').is(":visible") ) 830 if ( !ib2_email_validation($this.find('.ib2-validate-email')) ) reqpass += 1; 831 832 if ( reqpass > 0 ) return false;
833 else return true; 834 }); 835 }); 836 837 function ib2_email_validation( element ) { 838 if ( !ib2_validate_email(element.val()) ) { 839 element.addClass('ib2-field-error'); 840 if ( !element.parent().find('.ib2-field-error-txt').length ) { 841 element.parent().append('<span class="ib2-field-error-txt"></span>'); 842 } 843 element.parent().find('.ib2-field-error-txt').text('Please enter a valid email address.'); 844 return false; 845 } else { 846 element.removeClass('ib2-field-error'); 847 element.parent().find('.ib2-field-error-txt').remove(); 848 } 849 return true; 850 } 851 852 function ib2_required_validation( element ) { 853 if ( element.val() == '' ) { 854 element.addClass('ib2-field-error'); 855 if ( !element.parent().find('.ib2-field-error-txt').length ) { 856 element.parent().append('<span class="ib2-field-error-txt"></span>'); 857 } 858 element.parent().find('.ib2-field-error-txt').text('This field is required.'); 859 return false; 860 } else { 861 element.removeClass('ib2-field-error'); 862 element.parent().find('.ib2-field-error-txt').remove(); 863 } 864 return true; 865 } 866 867 function ib2_validate_email( value ) { 868 return /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i.test(value); 869 } 870 871 function ib2_popup_center( element ) { 872 var pos = 'fixed'; 873 var top = (($(window).height() / 2) - (element.outerHeight() / 2)); 874 var left = (($(window).width() / 2) - (element.outerWidth() / 2)); 875 876 if ( top < 0 ) top = 0; 877 if ( left < 0 ) left = 0; 878 879 // IE6 fix 880 if ( $.browser.msie && parseInt($.browser.version) <= 6 ) { 881 top = top + $(window).scrollTop(); 882 pos = 'absolute'; 883 } 884 885 element.css({ 886 'position' : pos, 887 'top' : top, 888 'left' : left 889 }); 890 } 891 892 function normal_countdown_format( elID, style ) { 893 var format = ''; 894 format += '<span class="ib2-digit"><span id="' + elID + '-tdays">0</span><span class="ib2-digit-txt"> day </span></span>'; 895 format += '<span class="ib2-digit"><span id="' + elID + '-thours">0</span><span class="ib2-digit-txt"> hour </span></span>'; 896 format += '<span class="ib2-digit"><span id="' + elID + '-tminutes">0</span><span class="ib2-digit-txt"> minute </span></span>'; 897 format += '<span class="ib2-digit"><span id="' + elID + '-tseconds">0</span><span class="ib2-digit-txt"> second </span></span>'; 898 899 var beforeText = '', afterText = ''; 900 if ( style == 'text' && $('#' + elID).data('before') != '' ) { 901 var btext = decodeURIComponent($('#' + elID).data('before')); 902 beforeText = '<span class="c-before-text"></span>' + btext + ' '; 903 904 format = beforeText + format; 905 } 906 907 if ( style == 'text' && $('#' + elID).data('after') != '' ) { 908 var atext = decodeURIComponent($('#' + elID).data('after')); 909 afterText = ' <span class="c-after-text"></span>' + atext; 910 format = format + afterText; 911 } 912 913 return format; 914 } 915 916 function normal_countdown_update( elID, days, hours, minutes, seconds ) { 917 if ( $('#' + elID + '-tseconds').length ) { 918 $('#' + elID + '-tseconds').text(seconds); 919 $('#' + elID + '-tminutes').text(minutes); 920 $('#' + elID + '-thours').text(hours); 921 $('#' + elID + '-tdays').text(days); 922 923 if ( seconds > 1 ) 924 $('#' + elID + '-tseconds').next('.ib2-digit-txt').text(' seconds '); 925 else 926 $('#' + elID + '-tseconds').next('.ib2-digit-txt').text(' second '); 927 928 if ( minutes > 1 ) 929 $('#' + elID + '-tminutes').next('.ib2-digit-txt').text(' minutes '); 930 else 931 $('#' + elID + '-tminutes').next('.ib2-digit-txt').text(' minute '); 932 933 if ( hours > 1 ) 934 $('#' + elID + '-thours').next('.ib2-digit-txt').text(' hours '); 935 else 936 $('#' + elID + '-thours').next('.ib2-digit-txt').text(' hour '); 937 938 if ( days > 1 ) 939 $('#' + elID + '-tdays').next('.ib2-digit-txt').text(' days '); 940 else 941 $('#' + elID + '-tdays').next('.ib2-digit-txt').text(' day '); 942 } 943 } 944 945 // CIRCULAR COUNTDOWN 946 /*! 947 * CREDIT 948 * jQuery Final Countdown 949 * 950 * @author Pragmatic Mates, http://pragmaticmates.com 951 * @version 1.1.1 952 * @license GPL 2 953 * @link https://github.com/PragmaticMates/jquery-final-countdown 954 */ 955 956 function convertToDeg( degree ) { 957 return (Math.PI/180) * degree - (Math.PI/180) * 90; 958 } 959 960 function create_circular_countdown( elID ) { 961 var borderWidth = 10; 962 963 if ( !circularTime[elID] || circularTime[elID] == null || typeof circularTime[elID] === "undefined" ) return false;
964 965 // Seconds BG 966 var seconds_bg_width = $('#' + elID + '-bg-seconds').width(); 967 var secondsBgStage = new Kinetic.Stage({ 968 container: elID + '-bg-seconds', 969 width: seconds_bg_width, 970 height: seconds_bg_width 971 }); 972 973 circleBgSeconds[elID] = new Kinetic.Shape({ 974 drawFunc: function(context) { 975 var seconds_bg_width = $('#' + elID + '-bg-seconds').width(); 976 var radius = seconds_bg_width / 2 - borderWidth / 2; 977 var x = seconds_bg_width / 2; 978 var y = seconds_bg_width / 2; 979 980 context.beginPath(); 981 context.arc(x, y, radius, convertToDeg(0), convertToDeg(360)); 982 context.fillStrokeShape(this); 983 }, 984 stroke: '#c2c2c2', 985 strokeWidth: borderWidth 986 }); 987 988 layerBgSeconds[elID] = new Kinetic.Layer(); 989 layerBgSeconds[elID].add(circleBgSeconds[elID]); 990 secondsBgStage.add(layerBgSeconds[elID]); 991 992 // Seconds 993 var seconds_width = $('#' + elID + '-seconds').width(); 994 var secondsStage = new Kinetic.Stage({ 995 container: elID + '-seconds', 996 width: seconds_width, 997 height: seconds_width 998 }); 999 1000 circleSeconds[elID] = new Kinetic.Shape({ 1001 drawFunc: function(context) { 1002 var seconds_width = $('#' + elID + '-seconds').width(); 1003 var radius = seconds_width / 2 - borderWidth / 2; 1004 var x = seconds_width / 2; 1005 var y = seconds_width / 2; 1006 1007 context.beginPath(); 1008 context.arc(x, y, radius, convertToDeg(0), convertToDeg(360 - (circularTime[elID].secs * 6))); 1009 context.fillStrokeShape(this); 1010 }, 1011 stroke: '#E7B708', 1012 strokeWidth: borderWidth 1013 }); 1014 1015 layerSeconds[elID] = new Kinetic.Layer(); 1016 layerSeconds[elID].add(circleSeconds[elID]); 1017 secondsStage.add(layerSeconds[elID]); 1018 1019 // Minutes Background 1020 var minutes_bg_width = $('#' + elID + '-bg-minutes').width(); 1021 var minutesBgStage = new Kinetic.Stage({ 1022 container: elID + '-bg-minutes', 1023 width: minutes_bg_width, 1024 height: minutes_bg_width 1025 }); 1026 1027 circleBgMinutes[elID] = new Kinetic.Shape({ 1028 drawFunc: function(context) { 1029 var minutes_bg_width = $('#' + elID + '-bg-minutes').width(); 1030 var radius = minutes_bg_width / 2 - borderWidth / 2; 1031 var x = minutes_bg_width / 2; 1032 var y = minutes_bg_width / 2; 1033 1034 context.beginPath(); 1035 context.arc(x, y, radius, convertToDeg(0), convertToDeg(360)); 1036 context.fillStrokeShape(this); 1037 }, 1038 stroke: '#c2c2c2', 1039 strokeWidth: borderWidth 1040 }); 1041 1042 layerBgMinutes[elID] = new Kinetic.Layer(); 1043 layerBgMinutes[elID].add(circleBgMinutes[elID]); 1044 minutesBgStage.add(layerBgMinutes[elID]); 1045 1046 // Minutes 1047 var minutes_width = $('#' + elID + '-minutes').width(); 1048 var minutesStage = new Kinetic.Stage({ 1049 container: elID + '-minutes', 1050 width: minutes_width, 1051 height: minutes_width 1052 }); 1053 1054 circleMinutes[elID] = new Kinetic.Shape({ 1055 drawFunc: function(context) { 1056 var minutes_width = $('#' + elID + '-minutes').width(); 1057 var radius = minutes_width / 2 - borderWidth / 2; 1058 var x = minutes_width / 2; 1059 var y = minutes_width / 2; 1060 1061 context.beginPath(); 1062 context.arc(x, y, radius, convertToDeg(0), convertToDeg(360 - (circularTime[elID].mins * 6))); 1063 context.fillStrokeShape(this); 1064 }, 1065 stroke: '#ACC742', 1066 strokeWidth: borderWidth 1067 }); 1068 1069 layerMinutes[elID] = new Kinetic.Layer(); 1070 layerMinutes[elID].add(circleMinutes[elID]); 1071 minutesStage.add(layerMinutes[elID]); 1072
1073 // Hours Background 1074 var hours_bg_width = $('#' + elID + '-bg-hours').width(); 1075 var hoursBgStage = new Kinetic.Stage({ 1076 container: elID + '-bg-hours', 1077 width: hours_bg_width, 1078 height: hours_bg_width 1079 }); 1080 1081 circleBgHours[elID] = new Kinetic.Shape({ 1082 drawFunc: function(context) { 1083 var hours_bg_width = $('#' + elID + '-bg-hours').width(); 1084 var radius = hours_bg_width / 2 - borderWidth/2; 1085 var x = hours_bg_width / 2; 1086 var y = hours_bg_width / 2; 1087 1088 context.beginPath(); 1089 context.arc(x, y, radius, convertToDeg(0), convertToDeg(360)); 1090 context.fillStrokeShape(this); 1091 }, 1092 stroke: '#c2c2c2', 1093 strokeWidth: borderWidth 1094 }); 1095 1096 layerBgHours[elID] = new Kinetic.Layer(); 1097 layerBgHours[elID].add(circleBgHours[elID]); 1098 hoursBgStage.add(layerBgHours[elID]); 1099 1100 // Hours 1101 var hours_width = $('#' + elID + '-hours').width(); 1102 var hoursStage = new Kinetic.Stage({ 1103 container: elID + '-hours', 1104 width: hours_width, 1105 height: hours_width 1106 }); 1107 1108 circleHours[elID] = new Kinetic.Shape({ 1109 drawFunc: function(context) { 1110 var hours_width = $('#' + elID + '-hours').width(); 1111 var radius = hours_width / 2 - borderWidth/2; 1112 var x = hours_width / 2; 1113 var y = hours_width / 2; 1114 1115 context.beginPath(); 1116 context.arc(x, y, radius, convertToDeg(0), convertToDeg(350 - (circularTime[elID].hours * 360 / 24))); 1117 context.fillStrokeShape(this); 1118 }, 1119 stroke: '#7995D5', 1120 strokeWidth: borderWidth 1121 }); 1122 1123 layerHours[elID] = new Kinetic.Layer(); 1124 layerHours[elID].add(circleHours[elID]); 1125 hoursStage.add(layerHours[elID]); 1126 1127 // Days Background 1128 var days_bg_width = $('#' + elID + '-bg-days').width(); 1129 var daysBgStage = new Kinetic.Stage({ 1130 container: elID + '-bg-days', 1131 width: days_bg_width, 1132 height: days_bg_width 1133 }); 1134 1135 circleBgDays[elID] = new Kinetic.Shape({ 1136 drawFunc: function(context) { 1137 var days_bg_width = $('#' + elID + '-bg-days').width(); 1138 var radius = days_bg_width/2 - borderWidth/2; 1139 var x = days_bg_width / 2; 1140 var y = days_bg_width / 2; 1141 1142 context.beginPath(); 1143 context.arc(x, y, radius, convertToDeg(0), convertToDeg(360)); 1144 context.fillStrokeShape(this); 1145 }, 1146 stroke: '#c2c2c2', 1147 strokeWidth: borderWidth 1148 }); 1149 1150 layerBgDays[elID] = new Kinetic.Layer(); 1151 layerBgDays[elID].add(circleBgDays[elID]); 1152 daysBgStage.add(layerBgDays[elID]); 1153 1154 // Days 1155 var days_width = $('#' + elID + '-days').width(); 1156 var daysStage = new Kinetic.Stage({ 1157 container: elID + '-days', 1158 width: days_width, 1159 height: days_width 1160 }); 1161 1162 var firstDay = circularTime[elID].days; 1163 if ( $('#' + elID).attr('data-day-start') ) { 1164 firstDay = parseInt($('#' + elID).data('dayStart')); 1165 } else { 1166 $('#' + elID).attr('data-day-start', circularTime[elID].days); 1167 $('#' + elID).data('dayStart', circularTime[elID].days); 1168 } 1169 1170 circleDays[elID] = new Kinetic.Shape({ 1171 drawFunc: function(context) { 1172 var days_width = $('#' + elID + '-days').width(); 1173 var radius = days_width/2 - borderWidth/2; 1174 var x = days_width / 2; 1175 var y = days_width / 2; 1176 1177 context.beginPath(); 1178 if ( circularTime[elID].days == 0 ) { 1179 context.arc(x, y, radius, convertToDeg(0), convertToDeg(0)); 1180 } else { 1181 var dayLeft = 360 - ((360 / firstDay) * (firstDay - circularTime[elID].days)); 1182 if ( dayLeft == 0 ) 1183 dayLeft = 360; 1184 context.arc(x, y, radius, convertToDeg(0), convertToDeg(dayLeft)); 1185 } 1186 context.fillStrokeShape(this); 1187 }, 1188 stroke: '#E16464', 1189 strokeWidth: borderWidth 1190 }); 1191 1192 layerDays[elID] = new Kinetic.Layer(); 1193 layerDays[elID].add(circleDays[elID]); 1194 daysStage.add(layerDays[elID]); 1195 } 1196 1197 function circular_draw( elID ) { 1198 if ( circularTime[elID] ) { 1199 1200 if ( $('#' + elID + '-days').length && $('#' + elID + '-days').width() > 0 ) 1201 layerDays[elID].draw(); 1202 1203 if ( $('#' + elID + '-hours').length && $('#' + elID + '-hours').width() > 0 ) 1204 layerHours[elID].draw(); 1205 1206 if ( $('#' + elID + '-minutes').length && $('#' + elID + '-minutes').width() > 0 ) 1207 layerMinutes[elID].draw(); 1208 1209 if ( $('#' + elID + '-seconds').length && $('#' + elID + '-seconds').width() > 0 ) 1210 layerSeconds[elID].draw(); 1211 } 1212 } 1213 1214 function circular_update_timer( elID, days, hours, mins, secs ) { 1215 if ( !circularTime[elID] || circularTime[elID] == null || typeof circularTime[elID] === "undefined" ) 1216 circularTime[elID] = {}; 1217 1218 circularTime[elID].secs = secs; 1219 circularTime[elID].hours = hours; 1220 circularTime[elID].mins = mins; 1221 circularTime[elID].days = days; 1222 1223 if ( $('#' + elID + '-seconds').length ) { 1224 $('#' + elID + '-seconds').next('.text').find('.val').text(secs); 1225 $('#' + elID + '-minutes').next('.text').find('.val').text(mins); 1226 $('#' + elID + '-hours').next('.text').find('.val').text(hours); 1227 $('#' + elID + '-days').next('.text').find('.val').text(days); 1228 } 1229 } 1230 1231 function circular_countdown_format( elID ) { 1232 var format = ''; 1233 format += '<div class="clock row">'; 1234 // Days 1235 format += '<div class="clock-item clock-days countdown-time-value col-sm-6 col-md-3">'; 1236 format += '<div class="wrap">'; 1237 format += '<div class="inner">'; 1238 format += '<div id="' + elID + '-bg-days" class="clock-background"></div>'; 1239 format += '<div id="' + elID + '-days" class="clock-canvas"></div>'; 1240 format += '<div class="text">'; 1241 format += '<p class="val">0</p>'; 1242 format += '<p class="type-days type-time">day(s)</p>'; 1243 format += '</div>'; 1244 format += '</div>'; 1245 format += '</div>'; 1246 format += '</div>'; 1247 1248 // Hours 1249 format += '<div class="clock-item clock-hours countdown-time-value col-sm-6 col-md-3">'; 1250 format += '<div class="wrap">'; 1251 format += '<div class="inner">'; 1252 format += '<div id="' + elID + '-bg-hours" class="clock-background"></div>'; 1253 format += '<div id="' + elID + '-hours" class="clock-canvas"></div>'; 1254 format += '<div class="text">'; 1255 format += '<p class="val">0</p>'; 1256 format += '<p class="type-hours type-time">hour(s)</p>'; 1257 format += '</div>'; 1258 format += '</div>'; 1259 format += '</div>'; 1260 format += '</div>'; 1261 1262 // Minutes 1263 format += '<div class="clock-item clock-minutes countdown-time-value col-sm-6 col-md-3">'; 1264 format += '<div class="wrap">'; 1265 format += '<div class="inner">'; 1266 format += '<div id="' + elID + '-bg-minutes" class="clock-background"></div>'; 1267 format += '<div id="' + elID + '-minutes" class="clock-canvas"></div>'; 1268 format += '<div class="text">'; 1269 format += '<p class="val">0</p>'; 1270 format += '<p class="type-minutes type-time">minute(s)</p>'; 1271 format += '</div>'; 1272 format += '</div>'; 1273 format += '</div>'; 1274 format += '</div>'; 1275 1276 // Seconds 1277 format += '<div class="clock-item clock-seconds countdown-time-value col-sm-6 col-md-3">'; 1278 format += '<div class="wrap">'; 1279 format += '<div class="inner">'; 1280 format += '<div id="' + elID + '-bg-seconds" class="clock-background"></div>'; 1281 format += '<div id="' + elID + '-seconds" class="clock-canvas"></div>'; 1282 format += '<div class="text">'; 1283 format += '<p class="val">0</p>'; 1284 format += '<p class="type-seconds type-time">second(s)</p>'; 1285 format += '</div>'; 1286 format += '</div>'; 1287 format += '</div>'; 1288 format += '</div>'; 1289 1290 format += '</div>'; 1291 1292 return format; 1293 } 1294 1295 function animation_map( effect ) { 1296 switch ( effect ) { 1297 case 'blind': 1298 effect = 'fadeInDown'; 1299 break; 1300 case 'clip': 1301 effect = 'fadeInUp'; 1302 break; 1303 case 'pulsate': 1304 effect = 'flash'; 1305 break; 1306 case 'drop': 1307 effect = 'bounceInDown'; 1308 break; 1309 case 'slide': 1310 effect = 'fadeInLeft'; 1311 break; 1312 case 'scale': 1313 effect = 'zoomIn'; 1314 break; 1315 case 'explode': 1316 effect = 'rubberBand'; 1317 break; 1318 case 'highlight': 1319 effect = 'lightSpeedIn'; 1320 break; 1321 case 'puff': 1322 effect = 'tada'; 1323 break; 1324 case 'fold': 1325 effect = 'flip'; 1326 break; 1327 } 1328 1329 return effect; 1330 } 1331})(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.