vendor: 8,047 bytes, lines 1-261
1+function ($) { "use strict"; 2 3 // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/) 4 // ============================================================ 5 6 function transitionEnd() { 7 var el = document.createElement('bootstrap') 8 9 var transEndEventNames = { 10 'WebkitTransition' : 'webkitTransitionEnd' 11 , 'MozTransition' : 'transitionend' 12 , 'OTransition' : 'oTransitionEnd otransitionend' 13 , 'transition' : 'transitionend' 14 } 15 16 for (var name in transEndEventNames) { 17 if (el.style[name] !== undefined) { 18 return { end: transEndEventNames[name] } 19 } 20 } 21 } 22 23 // http://blog.alexmaccaw.com/css-transitions 24 $.fn.emulateTransitionEnd = function (duration) { 25 var called = false, $el = this 26 $(this).one($.support.transition.end, function () { called = true }) 27 var callback = function () { if (!called) $($el).trigger($.support.transition.end) } 28 setTimeout(callback, duration) 29 return this 30 } 31 32 $(function () { 33 $.support.transition = transitionEnd() 34 }) 35 36}(window.jQuery); 37 38/* ======================================================================== 39 * Bootstrap: carousel.js v3.0.0 40 * http://twbs.github.com/bootstrap/javascript.html#carousel 41 * ======================================================================== 42 * Copyright 2012 Twitter, Inc. 43 * 44 * Licensed under the Apache License, Version 2.0 (the "License"); 45 * you may not use this file except in compliance with the License. 46 * You may obtain a copy of the License at 47 * 48 * http://www.apache.org/licenses/LICENSE-2.0 49 * 50 * Unless required by applicable law or agreed to in writing, software 51 * distributed under the License is distributed on an "AS IS" BASIS, 52 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 53 * See the License for the specific language governing permissions and 54 * limitations under the License. 55 * ======================================================================== */ 56 57 58+function ($) { "use strict"; 59 60 // CAROUSEL CLASS DEFINITION 61 // ========================= 62 var Carousel = function (element, options) { 63 this.$element = $(element) 64 this.$indicators = this.$element.find('.carousel-indicators') 65 this.options = options 66 this.paused = 67 this.sliding = 68 this.interval = 69 this.$active = 70 this.$items = null 71 72 this.options.pause == 'hover' && this.$element 73 .on('mouseenter', $.proxy(this.pause, this)) 74 .on('mouseleave', $.proxy(this.cycle, this)) 75 } 76 77 Carousel.DEFAULTS = { 78 interval: 5000 79 , pause: 'hover' 80 , wrap: true 81 } 82 83 Carousel.prototype.cycle = function (e) { 84 e || (this.paused = false) 85 86 this.interval && clearInterval(this.interval) 87 88 this.options.interval 89 && !this.paused 90 && (this.interval = setInterval($.proxy(this.next, this), this.options.interval)) 91 92 return this 93 } 94 95 Carousel.prototype.getActiveIndex = function () { 96 this.$active = this.$element.find('.item.active') 97 this.$items = this.$active.parent().children() 98 99 return this.$items.index(this.$active) 100 } 101 102 Carousel.prototype.to = function (pos) { 103 var that = this 104 var activeIndex = this.getActiveIndex() 105 106 if (pos > (this.$items.length - 1) || pos < 0) return 107 108 if (this.sliding) return this.$element.one('slid', function () { that.to(pos) }) 109 if (activeIndex == pos) return this.pause().cycle() 110 111 return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos])) 112 } 113 114 Carousel.prototype.pause = function (e) { 115 e || (this.paused = true) 116 117 //if (this.$element.find('.next, .prev').length && $.support.transition.end) { 118 //this.$element.trigger($.support.transition.end) 119 this.cycle(true) 120 //} 121 122 this.interval = clearInterval(this.interval) 123 124 return this 125 } 126 127 Carousel.prototype.next = function () { 128 if (this.sliding) return 129 return this.slide('next') 130 } 131 132 Carousel.prototype.prev = function () { 133 if (this.sliding) return 134 return this.slide('prev') 135 } 136 137 Carousel.prototype.slide = function (type, next) { 138 var $active = this.$element.find('.item.active') 139 var $next = next || $active[type]() 140 var isCycling = this.interval 141 var direction = type == 'next' ? 'left' : 'right' 142 var fallback = type == 'next' ? 'first' : 'last' 143 var that = this 144 145 if (!$next.length) { 146 if (!this.options.wrap) return 147 $next = this.$element.find('.item')[fallback]() 148 } 149 150 this.sliding = true 151 152 isCycling && this.pause() 153 154 var e = $.Event('slide.bs.carousel', { relatedTarget: $next[0], direction: direction }) 155 156 if ($next.hasClass('active')) return 157 158 if (this.$indicators.length) { 159 this.$indicators.find('.active').removeClass('active') 160 this.$element.one('slid', function () { 161 var $nextIndicator = $(that.$indicators.children()[that.getActiveIndex()]) 162 $nextIndicator && $nextIndicator.addClass('active') 163 }) 164 } 165 166 var $this = this.$element.hasClass('header_effect'); 167 if ($.support.transition && this.$element.hasClass('slide')) { 168 this.$element.trigger(e) 169 if (e.isDefaultPrevented()) return 170 var timer; 171 172 173 timer = setTimeout(function(){ 174 checkSliderForHeaderStyle($next, $this); 175 $next.addClass(type) 176 $next[0].offsetWidth // force reflow 177 $active.addClass(direction) 178 $next.addClass(direction) 179 $active 180 .one($.support.transition.end, function () { 181 $next.removeClass([type, direction].join(' ')).removeClass('inactive').addClass('active') 182 $active.removeClass(['active', direction].join(' ')).addClass('inactive') 183 that.sliding = false 184 setTimeout(function () { that.$element.trigger('slid') }, 0) 185 }) 186 .emulateTransitionEnd(600) 187 clearTimeout(timer); 188 }, 1000); 189 } else { 190 this.$element.trigger(e) 191 if (e.isDefaultPrevented()) return 192 $active.removeClass('active') 193 $next.addClass('active') 194 this.sliding = false 195 this.$element.trigger('slid') 196 } 197 198 isCycling && this.cycle() 199 200 return this 201 } 202 203 204 // CAROUSEL PLUGIN DEFINITION 205 // ========================== 206 207 var old = $.fn.carousel 208 209 $.fn.carousel = function (option) { 210 return this.each(function () { 211 var $this = $(this) 212 var data = $this.data('bs.carousel') 213 var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option) 214 var action = typeof option == 'string' ? option : options.slide 215 216 if (!data) $this.data('bs.carousel', (data = new Carousel(this, options))) 217 if (typeof option == 'number') data.to(option) 218 else if (action) data[action]() 219 else if (options.interval) data.pause().cycle() 220 }) 221 } 222 223 $.fn.carousel.Constructor = Carousel 224 225 226 // CAROUSEL NO CONFLICT 227 // ==================== 228 229 $.fn.carousel.noConflict = function () { 230 $.fn.carousel = old 231 return this 232 } 233 234 235 // CAROUSEL DATA-API 236 // ================= 237 238 $(document).on('click.bs.carousel.data-api', '[data-slide], [data-slide-to]', function (e) { 239 var $this = $(this), href 240 var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7 241 var options = $.extend({}, $target.data(), $this.data()) 242 var slideIndex = $this.attr('data-slide-to') 243 if (slideIndex) options.interval = false 244 245 $target.carousel(options) 246 247 if (slideIndex = $this.attr('data-slide-to')) { 248 $target.data('bs.carousel').to(slideIndex) 249 } 250 251 e.preventDefault() 252 }) 253 254 $(window).on('load', function () { 255 $('[data-ride="carousel"]').each(function () { 256 var $carousel = $(this) 257 $carousel.carousel($carousel.data()) 258 }) 259 }) 260 261}(window.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.