jQuery(document).ready(function() { // jquery start // Script for logo var uploadID = ''; jQuery('#upload_logo').click(function() { uploadID = jQuery(this).prev('input'); formfield = jQuery('#upload_image').attr('name'); post_id = jQuery('#post_ID').val(); tb_show('', 'media-upload.php?post_id='+post_id+'&type=image&TB_iframe=true'); return false; }); jQuery('#upload_favi').click(function() { uploadID = jQuery(this).prev('input'); formfield = jQuery('#custom_favi').attr('name'); post_id = jQuery('#post_ID').val(); tb_show('', 'media-upload.php?post_id='+post_id+'&type=image&TB_iframe=true'); return false; }); jQuery('#slider_img1').click(function() { uploadID = jQuery(this).prev('input'); formfield = jQuery('#slider_image1').attr('name'); post_id = jQuery('#post_ID').val(); tb_show('', 'media-upload.php?post_id='+post_id+'&type=image&TB_iframe=true'); return false; }); jQuery('#slider_img2').click(function() { uploadID = jQuery(this).prev('input'); formfield = jQuery('#slider_image2').attr('name'); post_id = jQuery('#post_ID').val(); tb_show('', 'media-upload.php?post_id='+post_id+'&type=image&TB_iframe=true'); return false; }); jQuery('#slider_img3').click(function() { uploadID = jQuery(this).prev('input'); formfield = jQuery('#slider_image3').attr('name'); post_id = jQuery('#post_ID').val(); tb_show('', 'media-upload.php?post_id='+post_id+'&type=image&TB_iframe=true'); return false; }); window.send_to_editor = function(html) { imgfav = jQuery('img',html).attr('src'); //jQuery('#upload_image').val(img); uploadID.val(imgfav); alert('hii'); tb_remove(); } // Jquery end }); // Theme tabs code $(function() { $( "#tabs" ).tabs(); });