o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1371157312.977192:@value"[{I" class:EFI"ProcessedAsset; FI"logical_path; FI"jquery.fancybox-buttons.js; FI" pathname; FI"~/Users/jmcasden/.rvm/gems/ruby-1.9.3-p286/gems/fancybox2-rails-0.2.4/vendor/assets/javascripts/jquery.fancybox-buttons.js; FI"content_type; FI"application/javascript; FI" mtime; FI"2013-04-30T16:38:27-04:00; FI"length; Fi½I"digest; F"%b2f0a476b92195a4f2b7a2d0ea48b736I"source; FI"½ /*! * Buttons helper for fancyBox * version: 1.0.5 (Mon, 15 Oct 2012) * @requires fancyBox v2.0 or later * * Usage: * $(".fancybox").fancybox({ * helpers : { * buttons: { * position : 'top' * } * } * }); * */ (function ($) { //Shortcut for fancyBox object var F = $.fancybox; //Add helper object F.helpers.buttons = { defaults : { skipSingle : false, // disables if gallery contains single image position : 'top', // 'top' or 'bottom' tpl : '
' }, list : null, buttons: null, beforeLoad: function (opts, obj) { //Remove self if gallery do not have at least two items if (opts.skipSingle && obj.group.length < 2) { obj.helpers.buttons = false; obj.closeBtn = true; return; } //Increase top margin to give space for buttons obj.margin[ opts.position === 'bottom' ? 2 : 0 ] += 30; }, onPlayStart: function () { if (this.buttons) { this.buttons.play.attr('title', 'Pause slideshow').addClass('btnPlayOn'); } }, onPlayEnd: function () { if (this.buttons) { this.buttons.play.attr('title', 'Start slideshow').removeClass('btnPlayOn'); } }, afterShow: function (opts, obj) { var buttons = this.buttons; if (!buttons) { this.list = $(opts.tpl).addClass(opts.position).appendTo('body'); buttons = { prev : this.list.find('.btnPrev').click( F.prev ), next : this.list.find('.btnNext').click( F.next ), play : this.list.find('.btnPlay').click( F.play ), toggle : this.list.find('.btnToggle').click( F.toggle ) } } //Prev if (obj.index > 0 || obj.loop) { buttons.prev.removeClass('btnDisabled'); } else { buttons.prev.addClass('btnDisabled'); } //Next / Play if (obj.loop || obj.index < obj.group.length - 1) { buttons.next.removeClass('btnDisabled'); buttons.play.removeClass('btnDisabled'); } else { buttons.next.addClass('btnDisabled'); buttons.play.addClass('btnDisabled'); } this.buttons = buttons; this.onUpdate(opts, obj); }, onUpdate: function (opts, obj) { var toggle; if (!this.buttons) { return; } toggle = this.buttons.toggle.removeClass('btnDisabled btnToggleOn'); //Size toggle button if (obj.canShrink) { toggle.addClass('btnToggleOn'); } else if (!obj.canExpand) { toggle.addClass('btnDisabled'); } }, beforeClose: function () { if (this.list) { this.list.remove(); } this.list = null; this.buttons = null; } }; }(jQuery)); ; FI"dependency_digest; F"%c9fe7e489dd9680e07ba5438d6cb0f71I"required_paths; F[I"~/Users/jmcasden/.rvm/gems/ruby-1.9.3-p286/gems/fancybox2-rails-0.2.4/vendor/assets/javascripts/jquery.fancybox-buttons.js; FI"dependency_paths; F[{I" path; FI"~/Users/jmcasden/.rvm/gems/ruby-1.9.3-p286/gems/fancybox2-rails-0.2.4/vendor/assets/javascripts/jquery.fancybox-buttons.js; FI" mtime; FI"2013-04-30T16:38:27-04:00; FI"digest; F"%aeb1fc2ba32e0fb761cd2643f17b3c68I" _version; F"%ffd318ca8b794f42f5029101c2cf5d91