jQuery(function() { renderList = function() { jQuery("#acs_sortable li").removeClass("even"); jQuery("#acs_sortable li:even").addClass("even"); } // tooltip jQuery(".acs_filter_help").tipTip({ maxWidth: "400px", content: jQuery(this).find(".acs_help_text").html() }); // sortable jQuery("#acs_sortable").sortable({ axis: "y", create: renderList, stop: renderList }); // load jQuery(".acs_option").click(function() { jQuery(this).find(".cb").toggleClass("on"); }); // ghost text jQuery("#acs_filter_input").keydown(function() { jQuery(".acs_ghost_text").html(""); }); // select box jQuery("#acs_select_box").click(function() { jQuery(this).toggleClass("active"); jQuery("#acs_select_popup").toggle(); }); // add selected posts jQuery("#add-selected-posts").click(function() { jQuery(".acs_option span.cb.on").each(function() { var parent = jQuery(this).parent(); var title = parent.find("span.acs_title").html(); var post_id = parent.attr("rel"); jQuery("#acs_sortable").append('