vendor: 18,736 bytes, lines 1-675
1/** 2 * @package SP Page Builder 3 * @author JoomShaper http://www.joomshaper.com 4 * @copyright Copyright (c) 2010 - 2015 JoomShaper 5 * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later 6*/ 7 8+function ($) { 9 'use strict'; 10 11 // ALERT CLASS DEFINITION 12 // ====================== 13 14 var dismiss = '[data-dismiss="sppb-alert"]' 15 var SPPBAlert = function (el) { 16 $(el).on('click', dismiss, this.close) 17 } 18 19 SPPBAlert.VERSION = '3.2.0' 20 21 SPPBAlert.prototype.close = function (e) { 22 var $this = $(this) 23 var selector = $this.attr('data-target') 24 25 if (!selector) { 26 selector = $this.attr('href') 27 selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 28 } 29 30 var $parent = $(selector) 31 32 if (e) e.preventDefault() 33 34 if (!$parent.length) { 35 $parent = $this.hasClass('sppb-alert') ? $this : $this.parent() 36 } 37 38 $parent.trigger(e = $.Event('close.sppb.alert')) 39 40 if (e.isDefaultPrevented()) return 41 42 $parent.removeClass('in') 43 44 function removeElement() { 45 // detach from parent, fire event then clean up data 46 $parent.detach().trigger('closed.sppb.alert').remove() 47 } 48 49 $.support.transition && $parent.hasClass('sppb-fade') ? 50 $parent 51 .one('bsTransitionEnd', removeElement) 52 .emulateTransitionEnd(150) : 53 removeElement() 54 } 55 56 57 // ALERT PLUGIN DEFINITION 58 // ======================= 59 60 function Plugin(option) { 61 return this.each(function () { 62 var $this = $(this) 63 var data = $this.data('sppb.alert') 64 65 if (!data) $this.data('sppb.alert', (data = new SPPBAlert(this))) 66 if (typeof option == 'string') data[option].call($this) 67 }) 68 } 69 70 var old = $.fn.spbalert 71 72 $.fn.spbalert = Plugin 73 $.fn.spbalert.Constructor = SPPBAlert 74 75 // ALERT NO CONFLICT 76 // ================= 77 78 $.fn.spbalert.noConflict = function () { 79 $.fn.spbalert = old 80 return this 81 } 82 83 84 // ALERT DATA-API 85 // ============== 86 87 $(document).on('click.sppb.alert.data-api', dismiss, SPPBAlert.prototype.close) 88 89}(jQuery); 90 91 92/* ======================================================================== 93 * Bootstrap: carousel.js v3.2.0 94 * http://getbootstrap.com/javascript/#carousel 95 * ======================================================================== 96 * Copyright 2011-2014 Twitter, Inc. 97 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 98 * ======================================================================== */ 99 100 101+function ($) { 102 'use strict'; 103 104 // CAROUSEL CLASS DEFINITION 105 // ========================= 106 107 var SPPBCarousel = function (element, options) { 108 this.$element = $(element).on('keydown.sppb.carousel', $.proxy(this.keydown, this)) 109 this.$indicators = this.$element.find('.sppb-carousel-indicators') 110 this.options = options 111 this.paused = 112 this.sliding = 113 this.interval = 114 this.$active = 115 this.$items = null 116 117 this.options.pause == 'hover' && this.$element 118 .on('mouseenter.sppb.carousel', $.proxy(this.pause, this)) 119 .on('mouseleave.sppb.carousel', $.proxy(this.cycle, this)) 120 } 121 122 SPPBCarousel.VERSION = '3.2.0' 123 124 SPPBCarousel.DEFAULTS = { 125 interval: 5000, 126 pause: 'hover', 127 wrap: true 128 } 129 130 SPPBCarousel.prototype.keydown = function (e) { 131 switch (e.which) { 132 case 37: this.prev(); break 133 case 39: this.next(); break 134 default: return 135 } 136 137 e.preventDefault() 138 } 139 140 SPPBCarousel.prototype.cycle = function (e) { 141 e || (this.paused = false) 142 143 this.interval && clearInterval(this.interval) 144 145 this.options.interval 146 && !this.paused 147 && (this.interval = setInterval($.proxy(this.next, this), this.options.interval)) 148 149 return this 150 } 151 152 SPPBCarousel.prototype.getItemIndex = function (item) { 153 this.$items = item.parent().children('.sppb-item') 154 return this.$items.index(item || this.$active) 155 } 156 157 SPPBCarousel.prototype.to = function (pos) { 158 var that = this 159 var activeIndex = this.getItemIndex(this.$active = this.$element.find('.sppb-item.active')) 160 161 if (pos > (this.$items.length - 1) || pos < 0) return 162 163 if (this.sliding) return this.$element.one('slid.sppb.carousel', function () { that.to(pos) }) // yes, "slid" 164 if (activeIndex == pos) return this.pause().cycle() 165 166 return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos])) 167 } 168 169 SPPBCarousel.prototype.pause = function (e) { 170 e || (this.paused = true) 171 172 if (this.$element.find('.next, .prev').length && $.support.transition) { 173 this.$element.trigger($.support.transition.end) 174 this.cycle(true) 175 } 176 177 this.interval = clearInterval(this.interval) 178 179 return this 180 } 181 182 SPPBCarousel.prototype.next = function () { 183 if (this.sliding) return 184 return this.slide('next') 185 } 186 187 SPPBCarousel.prototype.prev = function () { 188 if (this.sliding) return 189 return this.slide('prev') 190 } 191 192 SPPBCarousel.prototype.slide = function (type, next) { 193 var $active = this.$element.find('.sppb-item.active') 194 var $next = next || $active[type]() 195 var isCycling = this.interval 196 var direction = type == 'next' ? 'left' : 'right' 197 var fallback = type == 'next' ? 'first' : 'last' 198 var that = this 199 200 if (!$next.length) { 201 if (!this.options.wrap) return 202 $next = this.$element.find('.sppb-item')[fallback]() 203 } 204 205 if ($next.hasClass('active')) return (this.sliding = false) 206 207 var relatedTarget = $next[0] 208 var slideEvent = $.Event('slide.sppb.carousel', { 209 relatedTarget: relatedTarget, 210 direction: direction 211 }) 212 this.$element.trigger(slideEvent) 213 if (slideEvent.isDefaultPrevented()) return 214 215 this.sliding = true 216 217 isCycling && this.pause() 218 219 if (this.$indicators.length) { 220 this.$indicators.find('.active').removeClass('active') 221 var $nextIndicator = $(this.$indicators.children()[this.getItemIndex($next)]) 222 $nextIndicator && $nextIndicator.addClass('active') 223 } 224 225 var slidEvent = $.Event('slid.sppb.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, "slid" 226 if ($.support.transition && this.$element.hasClass('sppb-slide')) { 227 $next.addClass(type) 228 $next[0].offsetWidth // force reflow 229 $active.addClass(direction) 230 $next.addClass(direction) 231 $active 232 .one('bsTransitionEnd', function () { 233 $next.removeClass([type, direction].join(' ')).addClass('active') 234 $active.removeClass(['active', direction].join(' ')) 235 that.sliding = false 236 setTimeout(function () { 237 that.$element.trigger(slidEvent) 238 }, 0) 239 }) 240 .emulateTransitionEnd($active.css('transition-duration').slice(0, -1) * 1000) 241 } else { 242 $active.removeClass('active') 243 $next.addClass('active') 244 this.sliding = false 245 this.$element.trigger(slidEvent) 246 } 247 248 isCycling && this.cycle() 249 250 return this 251 } 252 253 254 // CAROUSEL PLUGIN DEFINITION 255 // ========================== 256 257 function Plugin(option) { 258 return this.each(function () { 259 var $this = $(this) 260 var data = $this.data('sppb.carousel') 261 var options = $.extend({}, SPPBCarousel.DEFAULTS, $this.data(), typeof option == 'object' && option) 262 var action = typeof option == 'string' ? option : options.slide 263 264 if (!data) $this.data('sppb.carousel', (data = new SPPBCarousel(this, options))) 265 if (typeof option == 'number') data.to(option) 266 else if (action) data[action]() 267 else if (options.interval) data.pause().cycle() 268 }) 269 } 270 271 var old = $.fn.sppbcarousel 272 273 $.fn.sppbcarousel = Plugin 274 $.fn.sppbcarousel.Constructor = SPPBCarousel 275 276 277 // CAROUSEL NO CONFLICT 278 // ==================== 279 280 $.fn.sppbcarousel.noConflict = function () { 281 $.fn.sppbcarousel = old 282 return this 283 } 284 285 //SP Page Builder 286 $(document).ready(function(){ 287 $('.sppb-carousel').each(function (index) { 288 var items = $(this).find('.sppb-item'); 289 var id = 'sppb-carousel' + (index+1); 290 var controller_items = ''; 291 292 //Set ID 293 $(this).attr('id', id ); 294 295 for (var i = 0; i < items.length; i++) { 296 if(i==0) { 297 controller_items += '<li data-sppb-target="#' + id + '" class="active" data-sppb-slide-to="0"></li>'; 298 } else { 299 controller_items += '\n<li data-sppb-target="#' + id + '" data-sppb-slide-to="' + i + '"></li>'; 300 } 301 }; 302 303 $(this).find('>.sppb-carousel-indicators').html(controller_items); 304 305 $(this).find('.sppb-carousel-control').attr('href', '#' + id); 306 307 $(this).find('.sppb-item').first().addClass('active'); 308 }); 309 }) 310 311 // CAROUSEL DATA-API 312 // ================= 313 314 $(document).on('click.sppb.carousel.data-api', '[data-slide], [data-sppb-slide-to]', function (e) { 315 var href 316 var $this = $(this) 317 var $target = $($this.attr('data-sppb-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7 318 if (!$target.hasClass('sppb-carousel')) return 319 var options = $.extend({}, $target.data(), $this.data()) 320 var slideIndex = $this.attr('data-sppb-slide-to') 321 if (slideIndex) options.interval = false 322 323 Plugin.call($target, options) 324 325 if (slideIndex) { 326 $target.data('sppb.carousel').to(slideIndex) 327 } 328 329 e.preventDefault() 330 }) 331 332 $(window).on('load', function () { 333 $('[data-sppb-ride="sppb-carousel"]').each(function () { 334 var $carousel = $(this) 335 Plugin.call($carousel, $carousel.data()) 336 }) 337 }) 338 339}(jQuery); 340 341 342/* ======================================================================== 343 * Bootstrap: collapse.js v3.2.0 344 * http://getbootstrap.com/javascript/#collapse 345 * ======================================================================== 346 * Copyright 2011-2014 Twitter, Inc. 347 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 348 * ======================================================================== */ 349 350+function ($) { 351 'use strict'; 352 353 $(document).on('click', '.sppb-panel-heading', function(event){ 354 event.preventDefault(); 355 var $this = $(this); 356 var $items = $this.closest('.sppb-panel-group').find('>div'); 357 var $handlers = $items.find('.sppb-panel-heading'); 358 var $panels = $items.find('.sppb-panel-collapse'); 359 360 if( $(this).hasClass('active') ) 361 { 362 $(this).removeClass('active'); 363 $panels.slideUp(); 364 } 365 else 366 { 367 $handlers.removeClass('active'); 368 $panels.slideUp(); 369 $(this).addClass('active').next().slideDown(); 370 } 371 }); 372 373}(jQuery); 374 375 376/* ======================================================================== 377 * Bootstrap: tab.js v3.2.0 378 * http://getbootstrap.com/javascript/#tabs 379 * ======================================================================== 380 * Copyright 2011-2014 Twitter, Inc. 381 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 382 * ======================================================================== */ 383 384 385+function ($) { 386 'use strict'; 387 388 // TAB CLASS DEFINITION 389 // ==================== 390 391 var SPPBTab = function (element) { 392 this.element = $(element) 393 } 394 395 SPPBTab.VERSION = '3.2.0' 396 397 SPPBTab.prototype.show = function () { 398 var $this = this.element 399 var $ul = $this.closest('ul:not(.dropdown-menu)') 400 var selector = $this.data('target') 401 402 if (!selector) { 403 selector = $this.attr('href') 404 selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 405 } 406 407 if ($this.parent('li').hasClass('active')) return 408 409 var previous = $ul.find('.active:last a')[0] 410 var e = $.Event('show.sppb.tab', { 411 relatedTarget: previous 412 }) 413 414 $this.trigger(e) 415 416 if (e.isDefaultPrevented()) return 417 418 var $target = $(selector) 419 420 this.activate($this.closest('li'), $ul) 421 this.activate($target, $target.parent(), function () { 422 $this.trigger({ 423 type: 'shown.sppb.tab', 424 relatedTarget: previous 425 }) 426 }) 427 } 428 429 SPPBTab.prototype.activate = function (element, container, callback) { 430 var $active = container.find('> .active') 431 var transition = callback 432 && $.support.transition 433 && $active.hasClass('sppb-fade') 434 435 function next() { 436 $active 437 .removeClass('active') 438 .find('> .dropdown-menu > .active') 439 .removeClass('active') 440 441 element.addClass('active') 442 443 if (transition) { 444 element[0].offsetWidth // reflow for transition 445 element.addClass('in') 446 } else { 447 element.removeClass('sppb-fade') 448 } 449 450 if (element.parent('.dropdown-menu')) { 451 element.closest('li.dropdown').addClass('active') 452 } 453 454 callback && callback() 455 } 456 457 transition ? 458 $active 459 .one('bsTransitionEnd', next) 460 .emulateTransitionEnd(150) : 461 next() 462 463 $active.removeClass('in') 464 } 465 466 467 // TAB PLUGIN DEFINITION 468 // ===================== 469 470 function Plugin(option) { 471 return this.each(function () { 472 var $this = $(this) 473 var data = $this.data('sppb.tab') 474 475 if (!data) $this.data('sppb.tab', (data = new SPPBTab(this))) 476 if (typeof option == 'string') data[option]() 477 }) 478 } 479 480 var old = $.fn.sppbtab 481 482 $.fn.sppbtab = Plugin 483 $.fn.sppbtab.Constructor = SPPBTab 484 485 486 // TAB NO CONFLICT 487 // =============== 488 489 $.fn.sppbtab.noConflict = function () { 490 $.fn.sppbtab = old 491 return this 492 } 493 494 //Dynamic IDS 495 $(document).ready(function () { 496 $('.sppb-tab').each(function (index){ 497 var id = 'sppb-tab' + (index+1); 498 499 $(this).find('>.sppb-nav').children().each(function (index) { 500 $(this).find('>a').attr('href', '#' + id + '-' + (index+1) ) 501 }); 502 503 $(this).find('>.sppb-tab-content').children().each(function (index) { 504 $(this).attr('id', id + '-' + (index+1) ) 505 }); 506 }); 507 }); 508 509 // TAB DATA-API 510 // ============ 511 512 $(document).on('click.sppb.tab.data-api', '[data-toggle="sppb-tab"], [data-toggle="sppb-pill"]', function (e) { 513 e.preventDefault() 514 Plugin.call($(this), 'show') 515 }) 516 517}(jQuery); 518 519 520/* ======================================================================== 521 * Bootstrap: tooltip.js v3.2.0 522 * http://getbootstrap.com/javascript/#tooltip 523 * Inspired by the original jQuery.tipsy by Jason Frame 524 * ======================================================================== 525 * Copyright 2011-2014 Twitter, Inc. 526 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 527 * ======================================================================== */ 528 529 530+function ($) { 531 'use strict'; 532 533 // TOOLTIP PUBLIC CLASS DEFINITION 534 // =============================== 535 536 var SPPBTooltip = function (element, options) { 537 this.type = 538 this.options = 539 this.enabled = 540 this.timeout = 541 this.hoverState = 542 this.$element = null 543 544 this.init('sppbtooltip', element, options) 545 } 546 547 SPPBTooltip.VERSION = '3.2.0' 548 549 SPPBTooltip.DEFAULTS = { 550 animation: true, 551 placement: 'top', 552 selector: false, 553 template: '<div class="sppb-tooltip" role="tooltip"><div class="sppb-tooltip-arrow"></div><div class="sppb-tooltip-inner"></div></div>', 554 trigger: 'hover focus', 555 title: '', 556 delay: 0, 557 html: false, 558 container: false, 559 viewport: { 560 selector: 'body', 561 padding: 0 562 } 563 } 564 565 SPPBTooltip.prototype.init = function (type, element, options) { 566 this.enabled = true 567 this.type = type 568 this.$element = $(element) 569 this.options = this.getOptions(options) 570 this.$viewport = this.options.viewport && $(this.options.viewport.selector || this.options.viewport) 571 572 var triggers = this.options.trigger.split(' ') 573 574 for (var i = triggers.length; i--;) { 575 var trigger = triggers[i] 576 577 if (trigger == 'click') { 578 this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this)) 579 } else if (trigger != 'manual') { 580 var eventIn = trigger == 'hover' ? 'mouseenter' : 'focusin' 581 var eventOut = trigger == 'hover' ? 'mouseleave' : 'focusout' 582 583 this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this)) 584 this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this)) 585 } 586 } 587 588 this.options.selector ? 589 (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) : 590 this.fixTitle() 591 } 592 593 SPPBTooltip.prototype.getDefaults = function () { 594 return SPPBTooltip.DEFAULTS 595 } 596 597 SPPBTooltip.prototype.getOptions = function (options) { 598 options = $.extend({}, this.getDefaults(), this.$element.data(), options) 599 600 if (options.delay && typeof options.delay == 'number') { 601 options.delay = { 602 show: options.delay, 603 hide: options.delay 604 } 605 } 606 607 return options 608 } 609 610 SPPBTooltip.prototype.getDelegateOptions = function () { 611 var options = {} 612 var defaults = this.getDefaults() 613 614 this._options && $.each(this._options, function (key, value) { 615 if (defaults[key] != value) options[key] = value 616 }) 617 618 return options 619 } 620 621 SPPBTooltip.prototype.enter = function (obj) { 622 var self = obj instanceof this.constructor ? 623 obj : $(obj.currentTarget).data('sppb.' + this.type) 624 625 if (!self) { 626 self = new this.constructor(obj.currentTarget, this.getDelegateOptions()) 627 $(obj.currentTarget).data('sppb.' + this.type, self) 628 } 629 630 clearTimeout(self.timeout) 631 632 self.hoverState = 'in' 633 634 if (!self.options.delay || !self.options.delay.show) return self.show() 635 636 self.timeout = setTimeout(function () { 637 if (self.hoverState == 'in') self.show() 638 }, self.options.delay.show) 639 } 640 641 SPPBTooltip.prototype.leave = function (obj) { 642 var self = obj instanceof this.constructor ? 643 obj : $(obj.currentTarget).data('sppb.' + this.type) 644 645 if (!self) { 646 self = new this.constructor(obj.currentTarget, this.getDelegateOptions()) 647 $(obj.currentTarget).data('sppb.' + this.type, self) 648 } 649 650 clearTimeout(self.timeout) 651 652 self.hoverState = 'out' 653 654 if (!self.options.delay || !self.options.delay.hide) return self.hide() 655 656 self.timeout = setTimeout(function () { 657 if (self.hoverState == 'out') self.hide() 658 }, self.options.delay.hide) 659 } 660 661 SPPBTooltip.prototype.show = function () { 662 var e = $.Event('show.sppb.' + this.type) 663 664 if (this.hasContent() && this.enabled) { 665 this.$element.trigger(e) 666 667 var inDom = $.contains(document.documentElement, this.$element[0]) 668 if (e.isDefaultPrevented() || !inDom) return 669 var that = this 670 671 var $tip = this.tip() 672 673 var tipId = this.getUID(this.type) 674 675 this.setContent()
676 $tip.attr('id', tipId) 677 this.$element.attr('aria-describedby', tipId) 678 679 if (this.options.animation) $tip.addClass('sppb-fade') 680 681 var placement = typeof this.options.placement == 'function' ? 682 this.options.placement.call(this, $tip[0], this.$element[0]) : 683 this.options.placement 684 685 var autoToken = /\s?auto?\s?/i 686 var autoPlace = autoToken.test(placement) 687 if (autoPlace) placement = placement.replace(autoToken, '') || 'top' 688 689 $tip 690 .detach() 691 .css({ top: 0, left: 0, display: 'block' }) 692 .addClass(placement) 693 .data('sppb.' + this.type, this) 694 695 this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element) 696 697 var pos = this.getPosition() 698 var actualWidth = $tip[0].offsetWidth 699 var actualHeight = $tip[0].offsetHeight 700 701 if (autoPlace) { 702 var orgPlacement = placement 703 var $parent = this.$element.parent() 704 var parentDim = this.getPosition($parent) 705 706 placement = placement == 'bottom' && pos.top + pos.height + actualHeight - parentDim.scroll > parentDim.height ? 'top' : 707 placement == 'top' && pos.top - parentDim.scroll - actualHeight < 0 ? 'bottom' : 708 placement == 'right' && pos.right + actualWidth > parentDim.width ? 'left' : 709 placement == 'left' && pos.left - actualWidth < parentDim.left ? 'right' : 710 placement 711 712 $tip 713 .removeClass(orgPlacement) 714 .addClass(placement) 715 } 716 717 var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight) 718 719 this.applyPlacement(calculatedOffset, placement) 720 721 var complete = function () { 722 that.$element.trigger('shown.sppb.' + that.type) 723 that.hoverState = null 724 } 725 726 $.support.transition && this.$tip.hasClass('sppb-') ? 727 $tip 728 .one('bsTransitionEnd', complete) 729 .emulateTransitionEnd(150) : 730 complete() 731 } 732 } 733 734 SPPBTooltip.prototype.applyPlacement = function (offset, placement) { 735 var $tip = this.tip() 736 var width = $tip[0].offsetWidth 737 var height = $tip[0].offsetHeight 738 739 // manually read margins because getBoundingClientRect includes difference 740 var marginTop = parseInt($tip.css('margin-top'), 10) 741 var marginLeft = parseInt($tip.css('margin-left'), 10) 742 743 // we must check for NaN for ie 8/9 744 if (isNaN(marginTop)) marginTop = 0 745 if (isNaN(marginLeft)) marginLeft = 0 746 747 offset.top = offset.top + marginTop 748 offset.left = offset.left + marginLeft 749 750 // $.fn.offset doesn't round pixel values 751 // so we use setOffset directly with our own function B-0 752 $.offset.setOffset($tip[0], $.extend({ 753 using: function (props) { 754 $tip.css({ 755 top: Math.round(props.top), 756 left: Math.round(props.left) 757 }) 758 } 759 }, offset), 0) 760 761 $tip.addClass('in') 762 763 // check to see if placing tip in new offset caused the tip to resize itself 764 var actualWidth = $tip[0].offsetWidth 765 var actualHeight = $tip[0].offsetHeight 766 767 if (placement == 'top' && actualHeight != height) { 768 offset.top = offset.top + height - actualHeight 769 } 770 771 var delta = this.getViewportAdjustedDelta(placement, offset, actualWidth, actualHeight) 772 773 if (delta.left) offset.left += delta.left 774 else offset.top += delta.top 775 776 var arrowDelta = delta.left ? delta.left * 2 - width + actualWidth : delta.top * 2 - height + actualHeight 777 var arrowPosition = delta.left ? 'left' : 'top' 778 var arrowOffsetPosition = delta.left ? 'offsetWidth' : 'offsetHeight' 779 780 $tip.offset(offset) 781 this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], arrowPosition) 782 } 783 784 SPPBTooltip.prototype.replaceArrow = function (delta, dimension, position) { 785 this.arrow().css(position, delta ? (50 * (1 - delta / dimension) + '%') : '') 786 } 787 788 SPPBTooltip.prototype.setContent = function () { 789 var $tip = this.tip() 790 var title = this.getTitle() 791 792 $tip.find('.sppb-tooltip-inner')[this.options.html ? 'html' : 'text'](title) 793 $tip.removeClass('sppb-fade in top bottom left right') 794 } 795 796 SPPBTooltip.prototype.hide = function () { 797 var that = this 798 var $tip = this.tip() 799 var e = $.Event('hide.sppb.' + this.type) 800 801 this.$element.removeAttr('aria-describedby') 802 803 function complete() { 804 if (that.hoverState != 'in') $tip.detach() 805 that.$element.trigger('hidden.sppb.' + that.type) 806 } 807 808 this.$element.trigger(e) 809 810 if (e.isDefaultPrevented()) return 811 812 $tip.removeClass('in') 813 814 $.support.transition && this.$tip.hasClass('sppb-fade') ? 815 $tip 816 .one('bsTransitionEnd', complete) 817 .emulateTransitionEnd(150) : 818 complete() 819 820 this.hoverState = null 821 822 return this 823 } 824 825 SPPBTooltip.prototype.fixTitle = function () { 826 var $e = this.$element 827 if ($e.attr('title') || typeof ($e.attr('data-original-title')) != 'string') { 828 $e.attr('data-original-title', $e.attr('title') || '').attr('title', '') 829 } 830 } 831 832 SPPBTooltip.prototype.hasContent = function () { 833 return this.getTitle() 834 } 835 836 SPPBTooltip.prototype.getPosition = function ($element) { 837 $element = $element || this.$element 838 var el = $element[0] 839 var isBody = el.tagName == 'BODY' 840 return $.extend({}, (typeof el.getBoundingClientRect == 'function') ? el.getBoundingClientRect() : null, { 841 scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop(), 842 width: isBody ? $(window).width() : $element.outerWidth(), 843 height: isBody ? $(window).height() : $element.outerHeight() 844 }, isBody ? { top: 0, left: 0 } : $element.offset()) 845 } 846 847 SPPBTooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) { 848 return placement == 'bottom' ? { top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2 } : 849 placement == 'top' ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } : 850 placement == 'left' ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } : 851 /* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width } 852 853 } 854 855 SPPBTooltip.prototype.getViewportAdjustedDelta = function (placement, pos, actualWidth, actualHeight) { 856 var delta = { top: 0, left: 0 } 857 if (!this.$viewport) return delta 858 859 var viewportPadding = this.options.viewport && this.options.viewport.padding || 0 860 var viewportDimensions = this.getPosition(this.$viewport) 861 862 if (/right|left/.test(placement)) { 863 var topEdgeOffset = pos.top - viewportPadding - viewportDimensions.scroll 864 var bottomEdgeOffset = pos.top + viewportPadding - viewportDimensions.scroll + actualHeight 865 if (topEdgeOffset < viewportDimensions.top) { // top overflow 866 delta.top = viewportDimensions.top - topEdgeOffset 867 } else if (bottomEdgeOffset > viewportDimensions.top + viewportDimensions.height) { // bottom overflow 868 delta.top = viewportDimensions.top + viewportDimensions.height - bottom
vendor: 6,728 bytes, lines 868-1107
868EdgeOffset 869 } 870 } else { 871 var leftEdgeOffset = pos.left - viewportPadding 872 var rightEdgeOffset = pos.left + viewportPadding + actualWidth 873 if (leftEdgeOffset < viewportDimensions.left) { // left overflow 874 delta.left = viewportDimensions.left - leftEdgeOffset 875 } else if (rightEdgeOffset > viewportDimensions.width) { // right overflow 876 delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset 877 } 878 } 879 880 return delta 881 } 882 883 SPPBTooltip.prototype.getTitle = function () { 884 var title 885 var $e = this.$element 886 var o = this.options 887 888 title = $e.attr('data-original-title') 889 || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title) 890 891 return title 892 } 893 894 SPPBTooltip.prototype.getUID = function (prefix) { 895 do prefix += ~~(Math.random() * 1000000) 896 while (document.getElementById(prefix)) 897 return prefix 898 } 899 900 SPPBTooltip.prototype.tip = function () { 901 return (this.$tip = this.$tip || $(this.options.template)) 902 } 903 904 SPPBTooltip.prototype.arrow = function () { 905 return (this.$arrow = this.$arrow || this.tip().find('.sppb-tooltip-arrow')) 906 } 907 908 SPPBTooltip.prototype.validate = function () { 909 if (!this.$element[0].parentNode) { 910 this.hide() 911 this.$element = null 912 this.options = null 913 } 914 } 915 916 SPPBTooltip.prototype.enable = function () { 917 this.enabled = true 918 } 919 920 SPPBTooltip.prototype.disable = function () { 921 this.enabled = false 922 } 923 924 SPPBTooltip.prototype.toggleEnabled = function () { 925 this.enabled = !this.enabled 926 } 927 928 SPPBTooltip.prototype.toggle = function (e) { 929 var self = this 930 if (e) { 931 self = $(e.currentTarget).data('sppb.' + this.type) 932 if (!self) { 933 self = new this.constructor(e.currentTarget, this.getDelegateOptions()) 934 $(e.currentTarget).data('sppb.' + this.type, self) 935 } 936 } 937 938 self.tip().hasClass('in') ? self.leave(self) : self.enter(self) 939 } 940 941 SPPBTooltip.prototype.destroy = function () { 942 clearTimeout(this.timeout) 943 this.hide().$element.off('.' + this.type).removeData('sppb.' + this.type) 944 } 945 946 947 // TOOLTIP PLUGIN DEFINITION 948 // ========================= 949 950 function Plugin(option) { 951 return this.each(function () { 952 var $this = $(this) 953 var data = $this.data('sppb.tooltip') 954 var options = typeof option == 'object' && option 955 956 if (!data && option == 'destroy') return 957 if (!data) $this.data('sppb.tooltip', (data = new SPPBTooltip(this, options))) 958 if (typeof option == 'string') data[option]() 959 }) 960 } 961 962 var old = $.fn.sppbtooltip 963 964 $.fn.sppbtooltip = Plugin 965 $.fn.sppbtooltip.Constructor = SPPBTooltip 966 967 968 // TOOLTIP NO CONFLICT 969 // =================== 970 971 $.fn.sppbtooltip.noConflict = function () { 972 $.fn.sppbtooltip = old 973 return this 974 } 975 976}(jQuery); 977 978 979 980/* ======================================================================== 981 * Bootstrap: popover.js v3.2.0 982 * http://getbootstrap.com/javascript/#popovers 983 * ======================================================================== 984 * Copyright 2011-2014 Twitter, Inc. 985 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 986 * ======================================================================== */ 987 988 989+function ($) { 990 'use strict'; 991 992 // POPOVER PUBLIC CLASS DEFINITION 993 // =============================== 994 995 var SPPBPopover = function (element, options) { 996 this.init('sppbpopover', element, options) 997 } 998 999 if (!$.fn.sppbtooltip) throw new Error('Popover requires tooltip.js') 1000 1001 SPPBPopover.VERSION = '3.2.0' 1002 1003 SPPBPopover.DEFAULTS = $.extend({}, $.fn.sppbtooltip.Constructor.DEFAULTS, { 1004 placement: 'right', 1005 trigger: 'click', 1006 content: '', 1007 template: '<div class="sppb-popover" role="tooltip"><div class="arrow"></div><h3 class="sppb-popover-title"></h3><div class="sppb-popover-content"></div></div>' 1008 }) 1009 1010 1011 // NOTE: POPOVER EXTENDS tooltip.js 1012 // ================================ 1013 1014 SPPBPopover.prototype = $.extend({}, $.fn.sppbtooltip.Constructor.prototype) 1015 1016 SPPBPopover.prototype.constructor = SPPBPopover 1017 1018 SPPBPopover.prototype.getDefaults = function () { 1019 return SPPBPopover.DEFAULTS 1020 } 1021 1022 SPPBPopover.prototype.setContent = function () { 1023 var $tip = this.tip() 1024 var title = this.getTitle() 1025 var content = this.getContent() 1026 1027 $tip.find('.sppb-popover-title')[this.options.html ? 'html' : 'text'](title) 1028 $tip.find('.sppb-popover-content').empty()[ // we use append for html objects to maintain js events 1029 this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text' 1030 ](content) 1031 1032 $tip.removeClass('sppb-fade top bottom left right in') 1033 1034 // IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do 1035 // this manually by checking the contents. 1036 if (!$tip.find('.sppb-popover-title').html()) $tip.find('.sppb-popover-title').hide() 1037 } 1038 1039 SPPBPopover.prototype.hasContent = function () { 1040 return this.getTitle() || this.getContent() 1041 } 1042 1043 SPPBPopover.prototype.getContent = function () { 1044 var $e = this.$element 1045 var o = this.options 1046 1047 return $e.attr('data-content') 1048 || (typeof o.content == 'function' ? 1049 o.content.call($e[0]) : 1050 o.content) 1051 } 1052 1053 SPPBPopover.prototype.arrow = function () { 1054 return (this.$arrow = this.$arrow || this.tip().find('.arrow')) 1055 } 1056 1057 SPPBPopover.prototype.tip = function () { 1058 if (!this.$tip) this.$tip = $(this.options.template) 1059 return this.$tip 1060 } 1061 1062 1063 // POPOVER PLUGIN DEFINITION 1064 // ========================= 1065 1066 function Plugin(option) { 1067 return this.each(function () { 1068 var $this = $(this) 1069 var data = $this.data('sppb.popover') 1070 var options = typeof option == 'object' && option 1071 1072 if (!data && option == 'destroy') return 1073 if (!data) $this.data('sppb.popover', (data = new SPPBPopover(this, options))) 1074 if (typeof option == 'string') data[option]() 1075 }) 1076 } 1077 1078 var old = $.fn.sppbpopover 1079 1080 $.fn.sppbpopover = Plugin 1081 $.fn.sppbpopover.Constructor = SPPBPopover 1082 1083 1084 // POPOVER NO CONFLICT 1085 // =================== 1086 1087 $.fn.sppbpopover.noConflict = function () { 1088 $.fn.sppbpopover = old 1089 return this 1090 } 1091 1092}(jQuery); 1093 1094 1095 1096/* ======================================================================== 1097 * Bootstrap: transition.js v3.2.0 1098 * http://getbootstrap.com/javascript/#transitions 1099 * ======================================================================== 1100 * Copyright 2011-2014 Twitter, Inc. 1101 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 1102 * ======================================================================== */ 1103 1104 1105+function ($) { 1106 'use strict'; 1107
1108 // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/) 1109 // ============================================================ 1110 1111 function transitionEnd() { 1112 var el = document.createElement('bootstrap') 1113 1114 var transEndEventNames = { 1115 WebkitTransition : 'webkitTransitionEnd', 1116 MozTransition : 'transitionend', 1117 OTransition : 'oTransitionEnd otransitionend', 1118 transition : 'transitionend' 1119 } 1120 1121 for (var name in transEndEventNames) { 1122 if (el.style[name] !== undefined) { 1123 return { end: transEndEventNames[name] } 1124 } 1125 } 1126 1127 return false // explicit for ie8 ( ._.) 1128 } 1129 1130 // http://blog.alexmaccaw.com/css-transitions 1131 $.fn.emulateTransitionEnd = function (duration) { 1132 var called = false 1133 var $el = this 1134 $(this).one('bsTransitionEnd', function () { called = true }) 1135 var callback = function () { if (!called) $($el).trigger($.support.transition.end) } 1136 setTimeout(callback, duration) 1137 return this 1138 } 1139 1140 $(function () { 1141 $.support.transition = transitionEnd() 1142 1143 if (!$.support.transition) return 1144 1145 $.event.special.bsTransitionEnd = { 1146 bindType: $.support.transition.end, 1147 delegateType: $.support.transition.end, 1148 handle: function (e) { 1149 if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments) 1150 } 1151 } 1152 }) 1153 1154}(jQuery); 1155 1156//fix carousel issue fr mootools 1157if (typeof jQuery != 'undefined' && typeof MooTools != 'undefined' ) { 1158 (function($) { 1159 $(document).ready(function(){ 1160 $('.sppb-carousel').each(function(index, element) { 1161 $(this)[index].slide = null; 1162 }); 1163 }); 1164 })(jQuery); 1165} 1166 1167 1168/* 1169 * Vide - v0.1.2 1170 * Easy as hell jQuery plugin for video backgrounds. 1171 * http://vodkabears.github.io/vide/ 1172 * 1173 * Made by Ilya Makarov 1174 * Under MIT License 1175 */ 1176;(function ($, window, document, navigator) { 1177 "use strict"; 1178 1179 /** 1180 * Vide settings 1181 */ 1182 var pluginName = "vide", 1183 defaults = { 1184 volume: 1, 1185 playbackRate: 1, 1186 muted: true, 1187 loop: true, 1188 autoplay: true, 1189 position: "50% 50%" 1190 }; 1191 1192 /** 1193 * Is iOs or Android? 1194 */ 1195 var iOS = /iPad|iPhone|iPod/i.test(navigator.userAgent), 1196 android = /Android/i.test(navigator.userAgent); 1197 1198 /** 1199 * Special plugin object for instances. 1200 * @type {Object} 1201 */ 1202 $[pluginName] = { 1203 lookup: [] 1204 }; 1205 1206 /** 1207 * Parse string with options 1208 * @param str 1209 * @returns {Object} 1210 */ 1211 var parseOptions = function (str) { 1212 var obj = {}, clearedStr, arr; 1213 1214 // remove spaces before and after delimiters 1215 clearedStr = str.replace(/\s*:\s*/g, ":").replace(/\s*,\s*/g, ","); 1216 1217 // parse string 1218 arr = clearedStr.split(","); 1219 var i, len, val; 1220 for (i = 0, len = arr.length; i < len; i++) { 1221 arr[i] = arr[i].split(":"); 1222 val = arr[i][1]; 1223 1224 // if val is an empty string, make it undefined 1225 if (!val) { 1226 val = undefined; 1227 } 1228 1229 // convert string value if it is like a boolean 1230 if (typeof val === "string" || val instanceof String) { 1231 val = val === "true" || (val === "false" ? false : val); 1232 } 1233 1234 // convert string value if it is like a number 1235 if (typeof val === "string" || val instanceof String) { 1236 val = !isNaN(val) ? +val : val; 1237 } 1238 1239 obj[arr[i][0]] = val; 1240 } 1241 1242 return obj; 1243 }; 1244 1245 /** 1246 * Parse position option 1247 * @param str 1248 * @returns {{x: *, y: *}} 1249 */ 1250 var parsePosition = function (str) { 1251 // convert anything to the string 1252 str = "" + str; 1253 1254 // default value is a center 1255 var args = str.split(/\s+/), 1256 x = "50%", y = "50%"; 1257 1258 for (var i = 0, len = args.length, arg; i < len; i++) { 1259 arg = args[i]; 1260 1261 // convert values 1262 if (arg === "left") { 1263 x = "0%"; 1264 } else if (arg === "right") { 1265 x = "100%"; 1266 } else if (arg === "top") { 1267 y = "0%"; 1268 } else if (arg === "bottom") { 1269 y = "100%"; 1270 } else if (arg === "center"){ 1271 if (i === 0) { 1272 x = "50%"; 1273 } else { 1274 y = "50%"; 1275 } 1276 } else { 1277 if (i === 0) { 1278 x = arg; 1279 } else { 1280 y = arg;
1281 } 1282 } 1283 } 1284 1285 return { x: x, y: y }; 1286 }; 1287 1288 /** 1289 * Vide constructor 1290 * @param element 1291 * @param path 1292 * @param options 1293 * @constructor 1294 */ 1295 function Vide(element, path, options) { 1296 this.element = $(element); 1297 this._defaults = defaults; 1298 this._name = pluginName; 1299 1300 // remove extension 1301 path = path.replace(/\.\w*$/, ""); 1302 1303 this.settings = $.extend({}, defaults, options); 1304 this.path = path; 1305 1306 this.init(); 1307 } 1308 1309 /** 1310 * Initialization 1311 */ 1312 Vide.prototype.init = function () { 1313 var that = this; 1314 1315 this.wrapper = $("<div>"); 1316 1317 // Set video wrapper styles 1318 var position = parsePosition(this.settings.position); 1319 this.wrapper.css({ 1320 "position": "absolute", 1321 "z-index": -1, 1322 "top": 0, 1323 "left": 0, 1324 "bottom": 0, 1325 "right": 0, 1326 "overflow": "hidden", 1327 "-webkit-background-size": "cover", 1328 "-moz-background-size": "cover", 1329 "-o-background-size": "cover", 1330 "background-size": "cover", 1331 "background-repeat": "no-repeat", 1332 "background-position": position.x + " " + position.y 1333 }); 1334 1335 // Set video poster 1336 if ($(this.element).data('vide-image')) { 1337 this.wrapper.css("background-image", "url(" + $(this.element).data('vide-image') + ")"); 1338 } 1339 1340 // if parent element has a static position, make it relative 1341 if (this.element.css("position") === "static") { 1342 this.element.css("position", "relative"); 1343 } 1344 1345 this.element.prepend(this.wrapper); 1346 1347 if (!iOS && !android) { 1348 1349 var video_src = ''; 1350 1351 if($(this.element).data('vide-mp4')) { 1352 video_src += "<source src='" + $(this.element).data('vide-mp4') + "' type='video/mp4'>"; 1353 } 1354 1355 if($(this.element).data('vide-ogv')) { 1356 video_src += "<source src='" + $(this.element).data('vide-ogv') + "' type='video/ogg'>"; 1357 } 1358 1359 this.video = $("<video>" + video_src + "</video>"); 1360 1361 // Disable visibility, while loading 1362 this.video.css("visibility", "hidden"); 1363 1364 // Set video properties 1365 this.video.prop({ 1366 autoplay: this.settings.autoplay, 1367 loop: this.settings.loop, 1368 volume: this.settings.volume, 1369 muted: this.settings.muted, 1370 playbackRate: this.settings.playbackRate 1371 }); 1372 1373 // Append video 1374 this.wrapper.append(this.video); 1375 1376 // Video alignment 1377 this.video.css({ 1378 "margin": "auto", 1379 "position": "absolute", 1380 "z-index": -1, 1381 "top": position.y, 1382 "left": position.x, 1383 "-webkit-transform": "translate(-" + position.x + ", -" + position.y + ")", 1384 "-ms-transform": "translate(-" + position.x + ", -" + position.y + ")", 1385 "transform": "translate(-" + position.x + ", -" + position.y + ")" 1386 }); 1387 1388 // resize video, when it's loaded 1389 this.video.bind("loadedmetadata." + pluginName, function () { 1390 that.video.css("visibility", "visible"); 1391 that.resize(); 1392 }); 1393 1394 // resize event is available only for 'window', 1395 // use another code solutions to detect DOM elements resizing 1396 $(this.element).bind("resize." + pluginName, function () { 1397 that.resize(); 1398 }); 1399 } 1400 }; 1401 1402 /** 1403 * Get video element of the background 1404 * @returns {HTMLVideoElement} 1405 */ 1406 Vide.prototype.getVideoObject = function () { 1407 return this.video ? this.video[0] : null; 1408 }; 1409 1410 /** 1411 * Resize video background 1412 */ 1413 Vide.prototype.resize = function () { 1414 if (!this.video) { 1415 return; 1416 } 1417 1418 // get native video size 1419 var videoHeight = this.video[0].videoHeight, 1420 videoWidth = this.video[0].videoWidth; 1421 1422 // get wrapper size 1423 var wrapperHeight = this.wrapper.height(),
1424 wrapperWidth = this.wrapper.width(); 1425 1426 if (wrapperWidth / videoWidth > wrapperHeight / videoHeight) { 1427 this.video.css({ 1428 "width": wrapperWidth + 2, // +2 pixels to prevent empty space after transformation 1429 "height": "auto" 1430 }); 1431 } else { 1432 this.video.css({ 1433 "width": "auto", 1434 "height": wrapperHeight + 2 // +2 pixels to prevent empty space after transformation 1435 }); 1436 } 1437 }; 1438 1439 /** 1440 * Destroy video background 1441 */ 1442 Vide.prototype.destroy = function () { 1443 this.element.unbind(pluginName); 1444 if (this.video) { 1445 this.video.unbind(pluginName); 1446 } 1447 1448 delete $[pluginName].lookup[this.index]; 1449 this.element.removeData(pluginName); 1450 this.wrapper.remove(); 1451 }; 1452 1453 /** 1454 * Plugin constructor 1455 * @param path 1456 * @param options 1457 * @returns {*} 1458 */ 1459 $.fn[pluginName] = function (path, options) { 1460 var instance; 1461 this.each(function () { 1462 instance = $.data(this, pluginName); 1463 if (instance) { 1464 // destroy plugin instance if exists 1465 instance.destroy(); 1466 } 1467 // create plugin instance 1468 instance = new Vide(this, path, options); 1469 instance.index = $[pluginName].lookup.push(instance) - 1; 1470 $.data(this, pluginName, instance); 1471 }); 1472 1473 return this; 1474 }; 1475 1476 $(document).ready(function () { 1477 // window resize event listener 1478 $(window).bind("resize." + pluginName, function () { 1479 for (var len = $[pluginName].lookup.length, instance, i = 0; i < len; i++) { 1480 instance = $[pluginName].lookup[i]; 1481 if (instance) { 1482 instance.resize(); 1483 } 1484 } 1485 }); 1486 1487 // Auto initialization. 1488 // Add 'data-vide-bg' attribute with a path to the video without extension. 1489 // Also you can pass options throw the 'data-vide-options' attribute. 1490 // 'data-vide-options' must be like "muted: false, volume: 0.5". 1491 $(document).find("[data-" + pluginName + "-bg]").each(function (i, element) { 1492 var $element = $(element), 1493 options = $element.data(pluginName + "-options"), 1494 path = ''; 1495 1496 if (!options) { 1497 options = {}; 1498 } else { 1499 options = parseOptions(options); 1500 } 1501 1502 $element[pluginName](path, options); 1503 }); 1504 }); 1505})(window.jQuery, window, document, navigator); 1506 1507 1508/*! WOW - v1.0.1 - 2014-08-15 1509 * Copyright (c) 2014 Matthieu Aussaguel; Licensed MIT */ 1510;(function() { 1511 var a, b, c, d = function(a, b) { 1512 return function() { 1513 return a.apply(b, arguments) 1514 } 1515 }, 1516 e = [].indexOf || function(a) { 1517 for (var b = 0, c = this.length; c > b; b++) 1518 if (b in this && this[b] === a) return b; 1519 return -1 1520 }; 1521 b = function() { 1522 function a() {} 1523 return a.prototype.extend = function(a, b) { 1524 var c, d; 1525 for (c in b) d = b[c], null == a[c] && (a[c] = d); 1526 return a 1527 }, a.prototype.isMobile = function(a) { 1528 return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(a) 1529 }, a 1530 }(), c = this.WeakMap || this.MozWeakMap || (c = function() { 1531 function a() { 1532 this.keys = [], this.values = [] 1533 } 1534 return a.prototype.get = function(a) { 1535 var b, c, d, e, f; 1536 for (f = this.keys, b = d = 0, e = f.length; e > d; b = ++d) 1537 if (c = f[b], c === a) return this.values[b] 1538 }, a.prototype.set = function(a, b) { 1539 var c, d, e, f, g; 1540 for (g = this.keys, c = e = 0, f = g.length; f > e; c = ++e) 1541 if (d = g[c], d === a) return void(this.values[c] = b); 1542 return this.keys.push(a), this.values.push(b) 1543 }, a 1544 }()), a = this.MutationObserver || this.WebkitMutationObserver || this.MozMutationObserver || (a = function() { 1545 function a() { 1546 console.warn("MutationObserver is not supported by your browser."), console.warn("WOW.js cannot detect dom mutations, please call .sync() after loading new content.") 1547 } 1548 return a.notSupported = !0, a.prototype.observe = function() {}, a 1549 }()), this.SPPBWOW = function() { 1550 function f(a) { 1551 null == a && (a = {}), this.scrollCallback = d(this.scrollCallback, this), this.scrollHandler = d(this.scrollHandler, this), this.start = d(this.start, this), this.scrolled = !0, this.config = this.util().extend(a, this.defaults), this.animationNameCache = new c 1552 } 1553 return f.prototype.defaults = { 1554 boxClass: "sppb-wow", 1555 animateClass: "sppb-animated", 1556 offset: 0, 1557 mobile: !0, 1558 live: !0 1559 }, f.prototype.init = function() { 1560 var a; 1561 return this.element = window.document.documentElement, "interactive" === (a = document.readyState) || "complete" === a ? this.start() : document.addEventListener("DOMContentLoaded", this.start), this.finished = [] 1562 }, f.prototype.start = function() { 1563 var b, c, d, e; 1564 if (this.stopped = !1, this.boxes = function() { 1565 var a, c, d, e; 1566 for (d = this.element.querySelectorAll("." + this.config.boxClass), e = [], a = 0, c = d.length; c > a; a++) b = d[a], e.push(b); 1567 return e 1568 }.call(this), this.all = function() { 1569 var a, c, d, e; 1570 for (d = this.boxes, e = [], a = 0, c = d.length; c > a; a++) b = d[a], e.push(b); 1571 return e 1572 }.call(this), this.boxes.length) 1573 if (this.disabled()) this.resetStyle(); 1574 else { 1575 for (e = this.boxes, c = 0, d = e.length; d > c; c++) b = e[c], this.applyStyle(b, !0); 1576 window.addEventListener("scroll", this.scrollHandler, !1), window.addEventListener("resize", this.scrollHandler, !1), this.interval = setInterval(this.scrollCallback, 50) 1577 } 1578 return this.config.live ? new a(function(a) { 1579 return function(b) { 1580 var c, d, e, f, g; 1581 for (g = [], e = 0, f = b.length; f > e;
vendor: 6,863 bytes, lines 1581-1718
1581 e++) d = b[e], g.push(function() { 1582 var a, b, e, f; 1583 for (e = d.addedNodes || [], f = [], a = 0, b = e.length; b > a; a++) c = e[a], f.push(this.doSync(c)); 1584 return f 1585 }.call(a)); 1586 return g 1587 } 1588 }(this)).observe(document.body, { 1589 childList: !0, 1590 subtree: !0 1591 }) : void 0 1592 }, f.prototype.stop = function() { 1593 return this.stopped = !0, window.removeEventListener("scroll", this.scrollHandler, !1), window.removeEventListener("resize", this.scrollHandler, !1), null != this.interval ? clearInterval(this.interval) : void 0 1594 }, f.prototype.sync = function() { 1595 return a.notSupported ? this.doSync(this.element) : void 0 1596 }, f.prototype.doSync = function(a) { 1597 var b, c, d, f, g; 1598 if (!this.stopped) { 1599 if (null == a && (a = this.element), 1 !== a.nodeType) return; 1600 for (a = a.parentNode || a, f = a.querySelectorAll("." + this.config.boxClass), g = [], c = 0, d = f.length; d > c; c++) b = f[c], e.call(this.all, b) < 0 ? (this.applyStyle(b, !0), this.boxes.push(b), this.all.push(b), g.push(this.scrolled = !0)) : g.push(void 0); 1601 return g 1602 } 1603 }, f.prototype.show = function(a) { 1604 return this.applyStyle(a), a.className = "" + a.className + " " + this.config.animateClass 1605 }, f.prototype.applyStyle = function(a, b) { 1606 var c, d, e; 1607 return d = a.getAttribute("data-sppb-wow-duration"), c = a.getAttribute("data-sppb-wow-delay"), e = a.getAttribute("data-sppb-wow-iteration"), this.animate(function(f) { 1608 return function() { 1609 return f.customStyle(a, b, d, c, e) 1610 } 1611 }(this)) 1612 }, f.prototype.animate = function() { 1613 return "requestAnimationFrame" in window ? function(a) { 1614 return window.requestAnimationFrame(a) 1615 } : function(a) { 1616 return a() 1617 } 1618 }(), f.prototype.resetStyle = function() { 1619 var a, b, c, d, e; 1620 for (d = this.boxes, e = [], b = 0, c = d.length; c > b; b++) a = d[b], e.push(a.setAttribute("style", "visibility: visible;")); 1621 return e 1622 }, f.prototype.customStyle = function(a, b, c, d, e) { 1623 return b && this.cacheAnimationName(a), a.style.visibility = b ? "hidden" : "visible", c && this.vendorSet(a.style, { 1624 animationDuration: c 1625 }), d && this.vendorSet(a.style, { 1626 animationDelay: d 1627 }), e && this.vendorSet(a.style, { 1628 animationIterationCount: e 1629 }), this.vendorSet(a.style, { 1630 animationName: b ? "none" : this.cachedAnimationName(a) 1631 }), a 1632 }, f.prototype.vendors = ["moz", "webkit"], f.prototype.vendorSet = function(a, b) { 1633 var c, d, e, f; 1634 f = []; 1635 for (c in b) d = b[c], a["" + c] = d, f.push(function() { 1636 var b, f, g, h; 1637 for (g = this.vendors, h = [], b = 0, f = g.length; f > b; b++) e = g[b], h.push(a["" + e + c.charAt(0).toUpperCase() + c.substr(1)] = d); 1638 return h 1639 }.call(this)); 1640 return f 1641 }, f.prototype.vendorCSS = function(a, b) { 1642 var c, d, e, f, g, h; 1643 for (d = window.getComputedStyle(a), c = d.getPropertyCSSValue(b), h = this.vendors, f = 0, g = h.length; g > f; f++) e = h[f], c = c || d.getPropertyCSSValue("-" + e + "-" + b); 1644 return c 1645 }, f.prototype.animationName = function(a) { 1646 var b; 1647 try { 1648 b = this.vendorCSS(a, "animation-name").cssText 1649 } catch (c) { 1650 b = window.getComputedStyle(a).getPropertyValue("animation-name") 1651 } 1652 return "none" === b ? "" : b 1653 }, f.prototype.cacheAnimationName = function(a) { 1654 return this.animationNameCache.set(a, this.animationName(a)) 1655 }, f.prototype.cachedAnimationName = function(a) { 1656 return this.animationNameCache.get(a) 1657 }, f.prototype.scrollHandler = function() { 1658 return this.scrolled = !0 1659 }, f.prototype.scrollCallback = function() { 1660 var a; 1661 return !this.scrolled || (this.scrolled = !1, this.boxes = function() { 1662 var b, c, d, e; 1663 for (d = this.boxes, e = [], b = 0, c = d.length; c > b; b++) a = d[b], a && (this.isVisible(a) ? this.show(a) : e.push(a)); 1664 return e 1665 }.call(this), this.boxes.length || this.config.live) ? void 0 : this.stop() 1666 }, f.prototype.offsetTop = function(a) { 1667 for (var b; void 0 === a.offsetTop;) a = a.parentNode; 1668 for (b = a.offsetTop; a = a.offsetParent;) b += a.offsetTop; 1669 return b 1670 }, f.prototype.isVisible = function(a) { 1671 var b, c, d, e, f; 1672 return c = a.getAttribute("data-sppb-wow-offset") || this.config.offset, f = window.pageYOffset, e = f + Math.min(this.element.clientHeight, innerHeight) - c, d = this.offsetTop(a), b = d + a.clientHeight, e >= d && b >= f 1673 }, f.prototype.util = function() { 1674 return null != this._util ? this._util : this._util = new b 1675 }, f.prototype.disabled = function() { 1676 return !this.config.mobile && this.util().isMobile(navigator.userAgent) 1677 }, f 1678 }() 1679}).call(this); 1680 1681//Initiat WOW JS 1682jQuery(function($){ 1683 new SPPBWOW().init(); 1684}); 1685 1686 1687 1688 1689 1690/** 1691 * author Christopher Blum 1692 * - based on the idea of Remy Sharp, http://remysharp.com/2009/01/26/element-in-view-event-plugin/ 1693 * - forked from http://github.com/zuk/jquery.inview/ 1694 */ 1695(function ($) { 1696 var inviewObjects = {}, viewportSize, viewportOffset, 1697 d = document, w = window, documentElement = d.documentElement, expando = $.expando, timer; 1698 1699 $.event.special.inview = { 1700 add: function(data) { 1701 inviewObjects[data.guid + "-" + this[expando]] = { data: data, $element: $(this) }; 1702 1703 // Use setInterval in order to also make sure this captures elements within 1704 // "overflow:scroll" elements or elements that appeared in the dom tree due to 1705 // dom manipulation and reflow 1706 // old: $(window).scroll(checkInView); 1707 // 1708 // By the way, iOS (iPad, iPhone, ...) seems to not execute, or at least delays 1709 // intervals while the user scrolls. Therefore the inview event might fire a bit late there 1710 // 1711 // Don't waste cycles with an interval until we get at least one element that 1712 // has bound to the inview event. 1713 if (!timer && !$.isEmptyObject(inviewObjects)) { 1714 timer = setInterval(checkInView, 250); 1715 } 1716 }, 1717 1718 remove: function(data) {
1719 try { delete inviewObjects[data.guid + "-" + this[expando]]; } catch(e) {} 1720 1721 // Clear interval when we no longer have any elements listening 1722 if ($.isEmptyObject(inviewObjects)) { 1723 clearInterval(timer); 1724 timer = null; 1725 } 1726 } 1727 }; 1728 1729 function getViewportSize() { 1730 var mode, domObject, size = { height: w.innerHeight, width: w.innerWidth }; 1731 1732 // if this is correct then return it. iPad has compat Mode, so will 1733 // go into check clientHeight/clientWidth (which has the wrong value). 1734 if (!size.height) { 1735 mode = d.compatMode; 1736 if (mode || !$.support.boxModel) { // IE, Gecko 1737 domObject = mode === 'CSS1Compat' ? 1738 documentElement : // Standards 1739 d.body; // Quirks 1740 size = { 1741 height: domObject.clientHeight, 1742 width: domObject.clientWidth 1743 }; 1744 } 1745 } 1746 1747 return size; 1748 } 1749 1750 function getViewportOffset() { 1751 return { 1752 top: w.pageYOffset || documentElement.scrollTop || d.body.scrollTop, 1753 left: w.pageXOffset || documentElement.scrollLeft || d.body.scrollLeft 1754 }; 1755 } 1756 1757 function checkInView() { 1758 var $elements = $(), elementsLength, i = 0; 1759 1760 $.each(inviewObjects, function(i, inviewObject) { 1761 var selector = inviewObject.data.selector, 1762 $element = inviewObject.$element; 1763 $elements = $elements.add(selector ? $element.find(selector) : $element); 1764 }); 1765 1766 elementsLength = $elements.length; 1767 if (elementsLength) { 1768 viewportSize = viewportSize || getViewportSize(); 1769 viewportOffset = viewportOffset || getViewportOffset(); 1770 1771 for (; i<elementsLength; i++) { 1772 // Ignore elements that are not in the DOM tree 1773 if (!$.contains(documentElement, $elements[i])) { 1774 continue; 1775 } 1776 1777 var $element = $($elements[i]), 1778 elementSize = { height: $element.height(), width: $element.width() }, 1779 elementOffset = $element.offset(), 1780 inView = $element.data('inview'), 1781 visiblePartX, 1782 visiblePartY, 1783 visiblePartsMerged; 1784 1785 // Don't ask me why because I haven't figured out yet: 1786 // viewportOffset and viewportSize are sometimes suddenly null in Firefox 5. 1787 // Even though it sounds weird: 1788 // It seems that the execution of this function is interferred by the onresize/onscroll event 1789 // where viewportOffset and viewportSize are unset 1790 if (!viewportOffset || !viewportSize) { 1791 return; 1792 } 1793 1794 if (elementOffset.top + elementSize.height > viewportOffset.top && 1795 elementOffset.top < viewportOffset.top + viewportSize.height && 1796 elementOffset.left + elementSize.width > viewportOffset.left && 1797 elementOffset.left < viewportOffset.left + viewportSize.width) { 1798 visiblePartX = (viewportOffset.left > elementOffset.left ? 1799 'right' : (viewportOffset.left + viewportSize.width) < (elementOffset.left + elementSize.width) ? 1800 'left' : 'both'); 1801 visiblePartY = (viewportOffset.top > elementOffset.top ? 1802 'bottom' : (viewportOffset.top + viewportSize.height) < (elementOffset.top + elementSize.height) ? 1803 'top' : 'both'); 1804 visiblePartsMerged = visiblePartX + "-" + visiblePartY; 1805 if (!inView || inView !== visiblePartsMerged) { 1806 $element.data('inview', visiblePartsMerged).trigger('inview', [true, visiblePartX, visiblePartY]); 1807 } 1808 } else if (inView) { 1809 $element.data('inview', false).trigger('inview', [false]); 1810 } 1811 } 1812 } 1813 } 1814 1815 $(w).bind("scroll resize scrollstop", function() { 1816 viewportSize = viewportOffset = null; 1817 }); 1818 1819 // IE < 9 scrolls to focused elements without firing the "scroll" event 1820 if (!documentElement.addEventListener && documentElement.attachEvent) { 1821 documentElement.attachEvent("onfocusin", function() { 1822 viewportOffset = null; 1823 }); 1824 } 1825 1826 //Animated Progress 1827 $(document).on('inview', '.sppb-progress', function(event, visible, visiblePartX, visiblePartY) { 1828 var $bar = $(this).find('.sppb-progress-bar'); 1829 if (visible) { 1830 $bar.css('width', $bar.data('width')); 1831 $(this).unbind('inview'); 1832 } 1833 }); 1834 1835 //Animated Number 1836 $.fn.sppbanimateNumbers = function(stop, commas, duration, ease) { 1837 return this.each(function() { 1838 var $this = $(this); 1839 var start = parseInt($this.text().replace(/,/g, "")); 1840 commas = (commas === undefined) ? true : commas; 1841 $({value: start}).animate({value: stop}, { 1842 duration: duration == undefined ? 1000 : duration, 1843 easing: ease == undefined ? "swing" : ease, 1844 step: function() { 1845 $this.text(Math.floor(this.value)); 1846 if (commas) { $this.text($this.text().replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,")); } 1847 }, 1848 complete: function() { 1849 if (parseInt($this.text()) !== stop) { 1850 $this.text(stop); 1851 if (commas) { $this.text($this.text().replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,")); } 1852 } 1853 } 1854 }); 1855 }); 1856 }; 1857 1858 $(document).on('inview', '.sppb-animated-number', function(event, visible, visiblePartX, visiblePartY) { 1859 var $this = $(this); 1860 if (visible) { 1861 $this.sppbanimateNumbers($this.data('digit'), false, $this.data('duration')); 1862 $this.unbind('inview'); 1863 } 1864 }); 1865 1866 // Pie Chart 1867 $(document).on('inview', '.sppb-pie-chart', function(event, visible, visiblePartX, visiblePartY) { 1868 var $this = $(this); 1869 1870 if (visible) { 1871 1872 $this.easyPieChart({ 1873 barColor: $this.data('barcolor'), 1874 trackColor: $this.data('trackcolor'), 1875 scaleColor: false, 1876 lineWidth: $this.data('width'), 1877 size: $this.data('size'), 1878 onStep: function(from, to, percent) { 1879 $this.find('.sppb-chart-percent > span').text(Math.round(percent) + '%'); 1880 } 1881 }); 1882 1883 $this.unbind('inview'); 1884 } 1885 }); 1886 1887})(jQuery); 1888//Ajax Contact Form 1889jQuery(function($) { 1890 $(document).on('submit', '.sppb-ajaxt-contact-form', function(event) { 1891 1892 event.preventDefault(); 1893 1894 var $self = $(this); 1895 var value = $(this).serializeArray(); 1896 var request = { 1897 'option' : 'com_sppagebuilder', 1898 'task' : 'ajax', 1899 'addon' : 'ajax_contact', 1900 'g-recaptcha-response' : $self.find('#g-recaptcha-response').val(), 1901 'data' : value 1902 }; 1903 1904 $.ajax({ 1905 type : 'POST', 1906 data : request, 1907 beforeSend: function(){ 1908 $self.find('.fa').addClass('fa-spinner fa-spin'); 1909 }, 1910 success: function (response) { 1911 var results = $.parseJSON(response); 1912 1913 try { 1914 var data = $.parseJSON(results.data); 1915 var content = data.content; 1916 var type = 'json'; 1917 } catch (e) { 1918 var content = results.data; 1919 var type = 'strings'; 1920 } 1921 1922 if (type == 'json') { 1923 if(data.status) { 1924 $self.trigger('reset'); 1925 } 1926 } else { 1927 $self.trigger('reset'); 1928 } 1929 1930 $self.find('.fa-spin').removeClass('fa-spinner fa-spin'); 1931 $self.next('.sppb-ajax-contact-status').html(content).fadeIn().delay(4000).fadeOut(500); 1932 } 1933 }); 1934 1935 return false;
1936 }); 1937}); 1938 1939//Ajax Optin Form 1940jQuery(function($) { 1941 $(document).on('submit', '.sppb-optin-form', function(event) { 1942 1943 event.preventDefault(); 1944 1945 var $self = $(this); 1946 var value = $(this).serializeArray(); 1947 var request = { 1948 'option' : 'com_sppagebuilder', 1949 'task' : 'ajax', 1950 'addon' : 'optin_form', 1951 'data' : value 1952 }; 1953 1954 $.ajax({ 1955 type : 'POST', 1956 data : request, 1957 beforeSend: function(){ 1958 $self.find('.fa').addClass('fa-spinner fa-spin'); 1959 }, 1960 success: function (response) { 1961 var results = $.parseJSON(response); 1962 var data = $.parseJSON(results.data); 1963 var statusClass = 'sppb-alert sppb-alert-warning'; 1964 if(data.status) { 1965 var statusClass = 'sppb-alert sppb-alert-success'; 1966 $self.trigger('reset'); 1967 } 1968 $self.find('.fa-spin').removeClass('fa-spinner fa-spin'); 1969 $self.next('.sppb-optin-form-status').html('<p class="' + statusClass + '">' + data.content + '</p>').fadeIn().delay(4000).fadeOut(1000); 1970 } 1971 }); 1972 1973 return false; 1974 }); 1975}); 1976
1977// Magnetic Popup 1978jQuery(function($) { 1979 $(document).on('click', '.sppb-magnific-popup', function(event) { 1980 event.preventDefault(); 1981 var $this = $(this); 1982 $this.magnificPopup({ 1983 type: $this.data('popup_type'), 1984 mainClass: $this.data('mainclass') 1985 }).magnificPopup('open'); 1986 }); 1987}); 1988 1989// Flip Box 1990jQuery(function ($) { 1991 if ($('.sppb-addon-sppb-flibox.flipon-click, .threeD-flipbox.flipon-click').length > 0) { 1992 $('.sppb-addon-sppb-flibox.flipon-click .sppb-flipbox-panel, .threeD-flipbox.flipon-click .threeD-content-wrap').on('click', function (event) { 1993 $(this).toggleClass('flip'); 1994 }); 1995 } 1996 1997 if ($('.sppb-addon-sppb-flibox.flipon-hover, .threeD-flipbox.flipon-hover').length > 0) { 1998 $('.sppb-addon-sppb-flibox.flipon-hover .sppb-flipbox-panel, .threeD-flipbox.flipon-hover .threeD-content-wrap').on({ 1999 mouseenter: function () { 2000 $(this).addClass('flip'); 2001 }, 2002 mouseleave: function () { 2003 $(this).removeClass('flip'); 2004 } 2005 }); 2006 } 2007 2008}); 2009 2010;(function ($) { 2011 // Youtube Video background 2012 window.sppbVideoBackgroundResize = function (row) { 2013 row.find(".sppb-youtube-video-bg").removeClass('hidden'); 2014 var containerW = row.innerWidth(), 2015 containerH = row.innerHeight() 2016 iframeW = containerW, 2017 iframeH = containerW * (9 / 16), 2018 marginTop = -Math.round((iframeH - containerH) / 2), 2019 marginLeft = -Math.round((iframeW - containerW) / 2); 2020 2021 if (containerW / containerH < 16 / 9) { 2022 iframeW = containerH * (16 / 9); 2023 iframeH = containerH; 2024 marginLeft = -Math.round((iframeW - containerW) / 2); 2025 marginTop = -Math.round((iframeH - containerH) / 2); 2026 } 2027 2028 row.find(".sppb-youtube-video-bg iframe").css({ 2029 maxWidth: "1000%", 2030 marginLeft: marginLeft, 2031 marginTop: marginTop, 2032 width: iframeW, 2033 height: iframeH 2034 }); 2035 } 2036 2037 $(window).on('load resize', function () { 2038 $('.sppb-row-have-ext-bg').each(function() { 2039 sppbVideoBackgroundResize($(this)); 2040 }); 2041 }); 2042})(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.