jQuery(document).ready(function(){ jQuery('.rm_options').slideUp(); jQuery('.rm_section h3').click(function(){ if(jQuery(this).parent().next('.rm_options').css('display')=='none') { jQuery(this).removeClass('inactive'); jQuery(this).addClass('active'); jQuery(this).children('img').removeClass('inactive'); jQuery(this).children('img').addClass('active'); } else { jQuery(this).removeClass('active'); jQuery(this).addClass('inactive'); jQuery(this).children('img').removeClass('active'); jQuery(this).children('img').addClass('inactive'); } jQuery(this).parent().next('.rm_options').slideToggle('slow'); }); }); function upload_ap_header_img(){ window.send_to_editor = function(html) { imgurl = jQuery('img',html).attr('src'); jQuery('#ap_header_img').val(imgurl); tb_remove(); } formfield = jQuery('#ap_header_img').attr('name'); tb_show('', 'media-upload.php?type=image&TB_iframe=true'); return false; } function upload_ap_box1_image(){ window.send_to_editor = function(html) { imgurl = jQuery('img',html).attr('src'); jQuery('#ap_box1_image').val(imgurl); tb_remove(); } formfield = jQuery('#ap_box1_image').attr('name'); tb_show('', 'media-upload.php?type=image&TB_iframe=true'); return false; } function upload_ap_box2_image(){ window.send_to_editor = function(html) { imgurl = jQuery('img',html).attr('src'); jQuery('#ap_box2_image').val(imgurl); tb_remove(); } formfield = jQuery('#ap_box2_image').attr('name'); tb_show('', 'media-upload.php?type=image&TB_iframe=true'); return false; } function upload_ap_box3_image(){ window.send_to_editor = function(html) { imgurl = jQuery('img',html).attr('src'); jQuery('#ap_box3_image').val(imgurl); tb_remove(); } formfield = jQuery('#ap_box3_image').attr('name'); tb_show('', 'media-upload.php?type=image&TB_iframe=true'); return false; } function upload_ap_box4_image(){ window.send_to_editor = function(html) { imgurl = jQuery('img',html).attr('src'); jQuery('#ap_box4_image').val(imgurl); tb_remove(); } formfield = jQuery('#ap_box4_image').attr('name'); tb_show('', 'media-upload.php?type=image&TB_iframe=true'); return false; }