// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults
var Application = {
    toggleSource: function(element) {
        this.element = $(element);
        this.source = Element.next(this.element.up());
        this.element.innerHTML = this.source.visible() ? 'Show Source' : 'Hide Source'
        Element.toggle(this.source);
    }
}