$('#rules').append('<%= escape_javascript( render(:partial => 'spree/admin/promotions/promotion_rule', :object => @promotion_rule) ) %>');
$('#<%= dom_id @promotion_rule %>').hide();
$('#<%= dom_id @promotion_rule %>').fadeIn();
$('#<%= dom_id @promotion_rule %> .tokeninput.products').productPicker();
$('#<%= dom_id @promotion_rule %> .tokeninput.users').userPicker();

$('#promotion_rule_type').html('<%= escape_javascript options_for_promotion_rule_types(@promotion) %>');
