o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1351551722.710326: @value"{I" class:EFI"ProcessedAsset;FI"logical_path;FI"bootstrap-affix.js;FI" pathname;FI"u/Users/fredwu/.rvm/gems/ruby-1.9.3-p194/gems/bootstrap-sass-2.1.0.1/vendor/assets/javascripts/bootstrap-affix.js;FI"content_type;FI"application/javascript;FI" mtime;FI"2012-10-30T10:00:28+11:00;FI" length;Fi‡ I" digest;F"%89902f9b632dc6301ae2d57ec2027bb7I" source;FI"‡ /* ========================================================== * bootstrap-affix.js v2.1.0 * http://twitter.github.com/bootstrap/javascript.html#affix * ========================================================== * Copyright 2012 Twitter, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * ========================================================== */ !function ($) { "use strict"; // jshint ;_; /* AFFIX CLASS DEFINITION * ====================== */ var Affix = function (element, options) { this.options = $.extend({}, $.fn.affix.defaults, options) this.$window = $(window).on('scroll.affix.data-api', $.proxy(this.checkPosition, this)) this.$element = $(element) this.checkPosition() } Affix.prototype.checkPosition = function () { if (!this.$element.is(':visible')) return var scrollHeight = $(document).height() , scrollTop = this.$window.scrollTop() , position = this.$element.offset() , offset = this.options.offset , offsetBottom = offset.bottom , offsetTop = offset.top , reset = 'affix affix-top affix-bottom' , affix if (typeof offset != 'object') offsetBottom = offsetTop = offset if (typeof offsetTop == 'function') offsetTop = offset.top() if (typeof offsetBottom == 'function') offsetBottom = offset.bottom() affix = this.unpin != null && (scrollTop + this.unpin <= position.top) ? false : offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ? 'bottom' : offsetTop != null && scrollTop <= offsetTop ? 'top' : false if (this.affixed === affix) return this.affixed = affix this.unpin = affix == 'bottom' ? position.top - scrollTop : null this.$element.removeClass(reset).addClass('affix' + (affix ? '-' + affix : '')) } /* AFFIX PLUGIN DEFINITION * ======================= */ $.fn.affix = function (option) { return this.each(function () { var $this = $(this) , data = $this.data('affix') , options = typeof option == 'object' && option if (!data) $this.data('affix', (data = new Affix(this, options))) if (typeof option == 'string') data[option]() }) } $.fn.affix.Constructor = Affix $.fn.affix.defaults = { offset: 0 } /* AFFIX DATA-API * ============== */ $(window).on('load', function () { $('[data-spy="affix"]').each(function () { var $spy = $(this) , data = $spy.data() data.offset = data.offset || {} data.offsetBottom && (data.offset.bottom = data.offsetBottom) data.offsetTop && (data.offset.top = data.offsetTop) $spy.affix(data) }) }) }(window.jQuery); ;FI"dependency_digest;F"%294d6dfc50211ca030ba5c1f7d223c68I"required_paths;F[I"u/Users/fredwu/.rvm/gems/ruby-1.9.3-p194/gems/bootstrap-sass-2.1.0.1/vendor/assets/javascripts/bootstrap-affix.js;FI"dependency_paths;F[{I" path;FI"u/Users/fredwu/.rvm/gems/ruby-1.9.3-p194/gems/bootstrap-sass-2.1.0.1/vendor/assets/javascripts/bootstrap-affix.js;FI" mtime;FI"2012-10-30T10:00:28+11:00;FI" digest;F"%80ded448730310d15fa42c73e0ec55b8I" _version;F"%9f3b95dd7ea3030dc35985c0a8020862