%= content_for :headers do%> <%= javascript_include_tag 'jquery.fcbkcomplete' %> <%= stylesheet_link_tag "fcbkcomplete", :media => "screen, projection" %> <%end%> <%= content_for :javascript do%> $("#speakers_name").fcbkcomplete({ cache: true, filter_case: false, filter_hide: true, firstselected: true, filter_selected: true, maxshownitems: 4, newel: true }); $(".newAttachEvent").click(function () { var new_id = new Date().getTime(); $(this).before( eventAttachment.replace(/NEW_RECORD/g, new_id) ); $(".newAttach2").show(); // Applies tags to the attachment $("#agenda_entry_attachments_attributes_" + new_id + "__tags").fcbkcomplete({ cache: true, filter_case: false, filter_hide: true, firstselected: true, filter_selected: true, maxshownitems: 4, newel: true, complete_opts: true }); }); $('.agenda_edit_entry img[tooltip]').each(function() { $(this).qtip({ content: $(this).attr('tooltip'), // Use the tooltip attribute of the element for the content position: {adjust: { screen: true }}, show: 'mouseover', hide: { when: 'mouseout', fixed: true }, style: 'mystyle' // Give it a crea mstyle to make it stand out }); }); $('.vid_type_radio').change(function(){ update_video_type_status(); }); update_video_type_status = function(){ if($("#agenda_entry_video_type_0").is(':checked')) { $('#video_upload_div').hide(); $('#video_embed_div').hide(); } else if($("#agenda_entry_video_type_1").is(':checked')) { $('#video_upload_div').hide(); $('#video_embed_div').show(); } else if($("#agenda_entry_video_type_2").is(':checked')) { $('#video_embed_div').hide(); $('#video_upload_div').show(); } else if($("#agenda_entry_video_type_3").is(':checked')) { $('#video_upload_div').hide(); $('#video_embed_div').hide(); } }; //call update_video_type_status when loading update_video_type_status(); <%end%>