{I" class:ETI"BundledAsset;FI"logical_path;TI"spina/dropdown.js;FI" pathname;TI"/Users/bram/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/spina-template-0.2.4/app/assets/javascripts/spina/dropdown.js.coffee;FI"content_type;TI"application/javascript;TI" mtime;Tl+Ü¥UI" length;Tiš I" digest;TI"%b88e0e0872f1c0e759d34e31d856d340;FI" source;TI"š (function() { var closeDropdown; $(document).on('click', 'body.dropdown', function() { return closeDropdown(); }); $(document).on('click', '[data-trigger="dropdown"]', function() { var body, dropdown, trigger; trigger = $(this); dropdown = $(trigger.attr('data-target')); body = $('body'); if (body.hasClass('dropdown')) { trigger.removeClass('button-active'); body.removeClass('dropdown'); dropdown.hide(); } else { trigger.addClass('button-active'); body.addClass('dropdown'); dropdown.show(); } return false; }); $(document).on('click', '[data-dropdown] ul, [data-dropdown] .sliding-dropdown', function(e) { return e.stopPropagation(); }); $(document).on('click', '.slide-controls .previous, .slide-controls .next', function(e) { var active_title, next, previous, sliding_dropdown, target; e.preventDefault(); sliding_dropdown = $(this).parents('.sliding-dropdown'); active_title = sliding_dropdown.find('.slide-title.active'); previous = active_title.prev('.slide-title'); next = active_title.next('.slide-title'); if ($(this).hasClass('previous') && previous.length > 0) { sliding_dropdown.find('.slide-title').removeClass('active'); previous.addClass('active'); target = previous.data('target'); sliding_dropdown.find('.slide').removeClass('active'); $(target).addClass('active'); } else if ($(this).hasClass('next') && next.length > 0) { sliding_dropdown.find('.slide-title').removeClass('active'); next.addClass('active'); target = next.data('target'); sliding_dropdown.find('.slide').removeClass('active'); $(target).addClass('active'); } if (sliding_dropdown.find('.slide-title.active').next('.slide-title').length > 0) { sliding_dropdown.find('.next').removeClass('muted'); } else { sliding_dropdown.find('.next').addClass('muted'); } if (sliding_dropdown.find('.slide-title.active').prev('.slide-title').length > 0) { return sliding_dropdown.find('.previous').removeClass('muted'); } else { return sliding_dropdown.find('.previous').addClass('muted'); } }); closeDropdown = function() { $('body').removeClass('dropdown'); $('[data-dropdown] ul, [data-dropdown] .sliding-dropdown').hide(); $('[data-trigger="dropdown"]').removeClass('button-active'); return false; }; }).call(this); ;TI"required_assets_digest;TI"%f64f37034383d253f80929f5fa079050;FI" _version;TI"%64e62ddc273c2f5847f30d698ca14b67;F