function send_code_tinymce_editor(el) {
	var is_close = false;
	var id = el.attr('id');

	if (!(!window.tinyMCE || !jQuery('#edButtonPreview').hasClass('active'))) {
		var activeEditor = tinyMCE.activeEditor;
		var selection = activeEditor.selection.getContent();
		var selection_text = activeEditor.selection.getContent({format : 'text'});
		var selection_d = selection;
		var $nl = "<br/>";
	} else {
		var activeEditor = jQuery('#content');
		var selection = '';
		var selection_text = selection;
		var selection_d = selection;
		var $nl = "\n";
	}
	
	if (!selection)
		selection = 'Content';


	switch (id){
		case 'sg_grids_1_1': out = ""+$nl+" [1]"+selection+"[/1] "+$nl+""; break;
		case 'sg_grids_1_2': out = ""+$nl+" [1of2]"+selection+"[/1of2] "+$nl+"[1of2_last]Content 2[/1of2_last]"; break;
		case 'sg_grids_1_3': out = ""+$nl+" [1of3]"+selection+"[/1of3] "+$nl+" [1of3]Content 2[/1of3] "+$nl+" [1of3_last] Content 3 [/1of3_last]"; break;
		case 'sg_grids_1_4': out = ""+$nl+" [1of4]"+selection+"[/1of4] "+$nl+" [1of4]Content 2[/1of4] "+$nl+" [1of4]Content 3[/1of4] "+$nl+" [1of4_last]Content 4[/1of4_last]"; break;
		case 'sg_grids_1_5': out = ""+$nl+" [1of5]"+selection+"[/1of5] "+$nl+" [1of5]Content 2[/1of5] "+$nl+" [1of5]Content 3[/1of5] "+$nl+" [1of5]Content 4[/1of5] "+$nl+" [1of5_last]Content 5[/1of5_last]"; break;
		case 'sg_grids_1_6': out = ""+$nl+" [1of6]"+selection+"[/1of6] "+$nl+" [1of6]Content 2[/1of6] "+$nl+" [1of6]Content 3[/1of6] "+$nl+" [1of6]Content 4[/1of6] "+$nl+" [1of6]Content 5[/1of6] "+$nl+" [1of6_last]Content 6[/1of6_last]"; break;
		
		case 'sg_grids_1_3-2_3': out = ""+$nl+" [1of3]"+selection+"[/1of3] "+$nl+" [2of3_last]Content 2[/2of3_last]"; break;
		case 'sg_grids_2_3-1_3': out = ""+$nl+" [2of3]"+selection+"[/2of3] "+$nl+" [1of3_last]Content 2[/1of3_last]"; break;
		
		case 'sg_grids_1_4-3_4': out = ""+$nl+" [1of4]"+selection+"[/1of4] "+$nl+" [3of4_last]Content 2[/3of4_last]"; break;
		case 'sg_grids_3_4-1_4': out = ""+$nl+" [3of4]"+selection+"[/3of4] "+$nl+" [1of4_last]Content 2[/1of4_last]"; break;
		case 'sg_grids_1_4-2_4-1_4': out = ""+$nl+" [1of4]"+selection+"[/1of4] "+$nl+" [2of4]Content 2[/2of4] "+$nl+" [1of4_last]Content 3[/1of4_last]"; break;
		case 'sg_grids_1_4-1_4-2_4': out = ""+$nl+" [1of4]"+selection+"[/1of4] "+$nl+" [1of4]Content 2[/1of4] "+$nl+" [2of4_last]Content 3[/2of4_last]"; break;
		case 'sg_grids_2_4-1_4-1_4': out = ""+$nl+" [2of4]"+selection+"[/2of4] "+$nl+" [1of4]Content 2[/1of4] "+$nl+" [1of4_last]Content 3[/1of4_last]"; break;

		case 'sg_grids_1_5-4_5': out = ""+$nl+" [1of5]"+selection+"[/1of5] "+$nl+" [4of5_last]Content 2[/4of5_last]"; break;
		case 'sg_grids_4_5-1_5': out = ""+$nl+" [4of5]"+selection+"[/4of5] "+$nl+" [1of5_last]Content 2[/1of5_last]"; break;
		case 'sg_grids_2_5-3_5': out = ""+$nl+" [2of5]"+selection+"[/2of5] "+$nl+" [3of5_last]Content 2[/3of5_last]"; break;
		case 'sg_grids_3_5-2_5': out = ""+$nl+" [3of5]"+selection+"[/3of5] "+$nl+" [2of5_last]Content 2[/2of5_last]"; break;
		case 'sg_grids_2_5-1_5-2_5': out = ""+$nl+" [2of5]"+selection+"[/2of5] "+$nl+" [1of5]Content 2[/1of5] "+$nl+" [2of5_last]Content 2[/2of5_last]"; break;



		case 'sg_default': 
		code = el.attr('rel');
		op_cont = el.attr('lang');
				
		switch (op_cont){
			default: content = selection_d; break;
			case 'text': content = selection_text; break;
			}
		if (op_cont == 'direct') {
		out = " "+$nl+"["+code+"]"+$nl+"";	
		}
		else {
		out = " ["+code+"";			 
		out += "]"+content+"[/"+code+"] ";
		}
		break;
		
		
		case 'sg_button': 
		button_title = jQuery('#sg_buttons_title').val();
		button_link = jQuery('#sg_buttons_link').val();
		button_color = jQuery('#sg_buttons_color').val();
		button_size = jQuery('#sg_buttons_size').val();
		button_target = jQuery('#sg_buttons_target').val();
		out = " [button size=\""+button_size+"\" color=\""+button_color+"\" link=\""+button_link+"\"";
			if(button_target != '') out += " target=\""+button_target+"\"";				 
		out += "]"+button_title+"[/button] ";
		break;
		
		case 'sg_blog': 
		blog_cat = jQuery('#sg_blog_cats').val();
		blog_title = jQuery('#sg_blog_title').val();
		blog_columns = jQuery('#sg_blog_columns').val();
		blog_limit = jQuery('#sg_blog_limit').val();
		blog_style = jQuery('#sg_blog_style').val();
		blog_thumbnails = jQuery('#sg_blog_thumb_height').val();
		if (jQuery('#sg_blog_excerpt:checked').val() !== undefined) blog_excerpt = 1; else blog_excerpt = 0;

		out = " "+$nl+" [blog ";
						
			if(blog_cat != '') out += " cat=\""+blog_cat+"\"";
			if(blog_title != '') out += " title=\""+blog_title+"\"";
			if(blog_columns != '') out += " columns=\""+blog_columns+"\"";
			if(blog_limit != '') out += " limit=\""+blog_limit+"\"";
			if(blog_style != '') out += " style=\""+blog_style+"\"";
			if(blog_thumbnails != '') out += " height=\""+blog_thumbnails+"\"";
			if(blog_style == '2' && blog_excerpt != '') out += " excerpt=\""+blog_excerpt+"\"";
			
		out += "] "+$nl+"";
		break;
		
		case 'sg_portfolio':
		source = jQuery('#sg_pr_source').val();
		
		port_title = jQuery('#sg_port_title').val();
		port_subtitle = jQuery('#sg_port_subtitle').val();
		port_columns = jQuery('#sg_port_columns').val();
		port_limit = jQuery('#sg_port_limit').val();
		port_height = jQuery('#sg_port_height').val();
		
		if (jQuery('#sg_port_show_carousel:checked').val() !== undefined) port_show_carousel = 1; else port_show_carousel = 0;


		out = " "+$nl+" [portfolio";
		
		if (source == 1) {
		
			port_cat = jQuery('#sg_port_cats').val();
			if (port_cat == '') {alert('Please select a portfolio category'); return false;}
		
			out += " from=\"a category\"";	
			out += " id=\""+port_cat+"\"";	
		
		}else if (source == 2) {
		
			port_post = jQuery('#sg_port_posts').val();
			
			if (port_post == '') {alert('Please select a portfolio post'); return false;}
			
			out += " from=\"a post gallery\"";	
			if(port_post != '') out += " id=\""+port_post+"\"";	
		
			
		}else if (source == 3) {
			port_posts = jQuery('#selected_portfolio_items').children('li');
			
			if (port_posts.length > 0){
				
				var total_ids = '';
			
				port_posts.each(function(){
					
					
					ids = jQuery(this).find('.portfolio_post_id').val();
					
					if (ids != '')
						total_ids += ids + ',';
					
					ids = null;
					
				});
				
				total_ids = total_ids.slice(0, -1);
				
				out += " from=\"selected posts\"";	
				if(total_ids != '') out += " id=\""+total_ids+"\"";	
			
			}else{
			
				alert('Please Select Some Post'); return false;
			
			}
			
		}
		
			if(port_show_carousel != '') {
				
				if(port_title == '') {alert('Please Enter A Container Title When Using The Portfolio Within Carousel');return false;}
				
			}
								
			if(port_title != '') out += " title=\""+port_title+"\"";
			if(port_subtitle != '') out += " subtitle=\""+port_subtitle+"\"";
			if(port_columns != '') out += " columns=\""+port_columns+"\"";
			if(port_limit != '' || port_limit != '-1') out += " limit=\""+port_limit+"\"";
			if(port_height != '') out += " height=\""+port_height+"\"";
			if(port_show_carousel != '') out += " carousel=\""+port_show_carousel+"\"";
			
		out += "] "+$nl+"";
		break;
		
		case 'sg_tabs': 
		sg_tabsa = jQuery('#sg_tabs_content').children('li');
		sg_tabs_style = jQuery('#sg_tab_style').val();
		var total_title = '';
		var total_tabs = '';
		
		sg_tabsa.each(function(){
			
				item_ = jQuery(this);
				sg_t_title = item_.find('.sg_tab_title').val();
				sg_t_content = item_.find('.sg_tab_content').val();
				
				if (sg_t_title == '') return false;
				
				total_title += sg_t_title + '|';
				total_tabs 	+= ' "+$nl+" &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[tab]'+sg_t_content+'[/tab]';
							  
			});
				total_title = total_title.slice(0, -1);
				if (total_title == '') return false;
				
		out = " "+$nl+" ["+sg_tabs_style+" tabs=\""+total_title+"\"";
						
		out += "] "+total_tabs+" "+$nl+" [/"+sg_tabs_style+"]"+$nl+""+$nl+"";
		break;

		case 'sg_list': 
		sg_lists = jQuery('#sg_list_content').children('li');
		sg_lists_type = jQuery('#sg_list_type').val();
		var total_lists = '';
		
		sg_lists.each(function(){
			
				item_ = jQuery(this);
				sg_l_content = item_.find('.sg_list_cont').val();
				
				if (sg_l_content == '') return false;
				
				total_lists  += " "+$nl+"\t[li]"+sg_l_content+"[/li]";
							  
			});
				if (total_lists == '') return false;
				
		out = " "+$nl+" [list type=\""+sg_lists_type+"\"";
						
		out += "] "+total_lists+" "+$nl+" [/list]"+$nl+""+$nl+"";
		break;
		
		case 'sg_showcase': 
		sg_showcase = jQuery('#sg_slideshow').children('li');
		sg_source = jQuery('#sg_sc_source').val();
		sg_thumbnail = jQuery('#sg_sc_thumb').val();
		width = jQuery('#sg_sc_width').val();
		height = jQuery('#sg_sc_height').val();
		sg_ppost = jQuery('#sg_ppost').val();
		
			if (sg_source == 1){
				var total_showcase = '';
				
				sg_showcase.each(function(){
					
						item_ = jQuery(this);
						sg_sc_content = item_.find('.sg_slideshow_img').val();
						
						if (sg_sc_content == '') return false;
						
						total_showcase  += ' "+$nl+" &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[slide]'+sg_sc_content+'[/slide]';
									  
					});
						if (total_showcase == '') return false;
						
				out = " "+$nl+" [slideshow";
								
					if(width != '') out += " width=\""+width+"\"";
					if(height != '') out += " height=\""+height+"\"";
					if(sg_thumbnail != '') out += " thumbnails=\""+sg_thumbnail+"\"";
				
				out += "] "+total_showcase+" "+$nl+" [/slideshow]"+$nl+""+$nl+"";
			}
			
			else
			
			{
				
				if (sg_ppost == '') {alert('Please select a portfolio post'); return false;}

				
				out = " "+$nl+" [showcase id=\""+sg_ppost+"\"";
								
					if(width != '') out += " width=\""+width+"\"";
					if(height != '') out += " height=\""+height+"\"";
					if(sg_thumbnail != '') out += " thumbnails=\""+sg_thumbnail+"\"";
				
				out += "] "+$nl+"";
			
			}
			
		
		break;
		
		case 'sg_toggle': 
		toggle_title = jQuery('#sg_toggle_title').val();
		toggle_content = jQuery('#sg_toggle_content').val();
		toggle_state = jQuery('#sg_toggle_state').val();
		toggle_group = jQuery('#sg_toggle_group').val();
		
		if (toggle_title == '') return false;
		
		out = " "+$nl+" [toggle title=\""+toggle_title+"\" ";
						
			if(toggle_state != '') out += " closed=\""+toggle_state+"\"";
			if(toggle_group != '') out += " group=\""+toggle_group+"\"";
			
		out += "] "+$nl+" "+toggle_content+"  "+$nl+"[/toggle] "+$nl+"";
		break;
		
		case 'sg_custom_title': 
		color = jQuery('#sg_custom_title_color').val();
		bg = jQuery('#sg_custom_title_bg').val();
				
		out = " "+$nl+" [custom_title";
						
			if(color != '') out += " color=\"#"+color+"\"";
			if(bg != '') out += " bg=\"#"+bg+"\"";
			
		out += "]"+selection_text+"[/custom_title] "+$nl+"";
		break;
		
		case 'sg_box': 
		code = el.attr('rel');
		title = jQuery('#sg_box_title').val();
				

		out = " ["+code+"";			 
			if(title != '') out += " title=\""+title+"\"";
		out += "]"+selection+"[/"+code+"] ";
		break;
		
		case 'sg_icon_box': 
		icon = jQuery('#sg_icon_box_icon').val();
		color = jQuery('#sg_icon_box_color').val();
		title = jQuery('#sg_icon_box_title').val();
		content = jQuery('#sg_icon_box_content').val();
		
		if(content == '') content = selection;
		if(content == '') content = "Content Here";

		out = " [icon_box";
			if(icon != '') out += " icon=\""+icon+"\"";	 
			if(color != '') out += " color=\""+color+"\"";	 
			if(title != '') out += " title=\""+title+"\"";
		out += "]"+content+"[/icon_box] ";
		break;
		
		case 'sg_icon': 
		icon = jQuery('#sg_icon_icon').val();
		
		if(icon == '') return false;

		out = " [icon";
			if(icon != '') out += " src=\""+icon+"\"";	 
		out += "] ";
		break;
		
		
		case 'sg_blocks': 
		code = jQuery('#sg_blocks_float').val();
		left = jQuery('#sg_blocks_left').val();
		right = jQuery('#sg_blocks_right').val();
		top = jQuery('#sg_blocks_top').val();
		bottom = jQuery('#sg_blocks_bottom').val();
		style = jQuery('#sg_blocks_style').val();
				

		out = " ["+code+"";			 
			if(top != '') out += " top=\""+top+"\"";
			if(bottom != '') out += " bottom=\""+bottom+"\"";
			if(left != '') out += " left=\""+left+"\"";
			if(right != '') out += " right=\""+right+"\"";
			if(style != '') out += " style=\""+style+"\"";
		out += "]"+selection+"[/"+code+"] ";
		break;	
		
		case 'sg_framed_image': 
		code = jQuery('#sg_frames_align').val();
		image = jQuery('#sg_frames_image').val();
		image_lb = jQuery('#sg_frames_image_lb').val();
		caption = jQuery('#sg_frames_caption').val();
		
		out = "";
		
			if(image_lb != '') out += "<br />[lightbox href=\""+image_lb+"\"]";
		out += " ["+code+"";			 
			if(caption != '') out += " caption=\""+caption+"\"";
		out += "]";
			if(image != '') out += " <img src=\""+image+"\" alt=\"\" />";
		out += "[/"+code+"] ";
			if(image_lb != '') out += "<br />[/lightbox]";
		break;			
		
		case 'sg_twitter': 
		source = jQuery('#sg_twitter_source').val();
		key = jQuery('#sg_twitter_key').val();
		columns = jQuery('#sg_twitter_columns').val();
		count = jQuery('#sg_twitter_count').val();
		
		
		if (source == 'user'){
			
		out = " "+$nl+" [twitter username=\""+key+"\" ";
						
			if(count != '') out += " count=\""+count+"\"";
			if(columns != '') out += " columns=\""+columns+"\"";
			
		out += "] "+$nl+"";
			
			
			}
		else {
		out = " "+$nl+" [twitter_search key=\""+key+"\" ";
						
			if(count != '') out += " count=\""+count+"\"";
			if(columns != '') out += " columns=\""+columns+"\"";
			
		out += "] "+$nl+"";

			}
		break;
		
		case 'sg_action': 
		button_title = jQuery('#sg_act_title').val();
		button_link = jQuery('#sg_act_link').val();
		button_color = jQuery('#sg_act_color').val();
		text = jQuery('#sg_act_text').val();
		out = " [action";
			if(button_title != '') out += " button_title=\""+button_title+"\"";				 
			if(button_link != '') out += " link=\""+button_link+"\"";				 
			if(button_color != '') out += " color=\""+button_color+"\"";				 
		out += "]"+text+"[/action] ";
		break;
		
		case 'sg_lbx': 
		lbx_url = jQuery('#sg_lbx_url').val();
		lbx_desc = jQuery('#sg_lbx_desc').val();
		lbx_group = jQuery('#sg_lbx_group').val();
		
		if (lbx_url == '') return false;
		
		out = " [lightbox";
			out += " href=\""+lbx_url+"\"";				 
			if(lbx_desc != '') out += " desc=\""+lbx_desc+"\"";				 
			if(lbx_group != '') out += " group=\""+lbx_group+"\"";				 
		out += "]"+selection+"[/lightbox] ";
		break;
		
		case 'sg_slider': 
		slider_ids = jQuery('#sg_slider_ids').val();
		
		if (slider_ids == '') return false;
		
		out = " [slider";
			if(slider_ids != '') out += " id=\""+slider_ids+"\"";				 
		out += "]";
		break;
		} // end of switch
		
	if (out) {
		
		//window.tinyMCE.execInstanceCommand('content', 'mceInsertContent', false, out);
		//tinyMCE.execInstanceCommand("content", "mceFocus");
		window.send_to_editor(out);
	
		if (is_close)
			close_shortcodes();
		jQuery('#codesended').fadeIn(500).delay(300).fadeOut(700);
	}

}


function call_shortcodes(){

	var selection;

	
	shortcodes_tabs = jQuery('#cloudfw_shortcode_tab');
	loading_ = jQuery('#cloudfw_shortcode_tab_loading');
	main_container = jQuery('#cloudfw_shortcode_main_container');
	shortcodes_tabs.addClass('actived');
	loading_.show().css('visibility','visible');
	
	if(window.tinyMCE) {
		//TODO: For QTranslate we should use here 'qtrans_textarea_content' instead 'content'
		//selection = activeEditor.selection.getContent();
		//window.tinyMCE.execInstanceCommand('content', 'mceInsertContent', false, 'Test');

	}		
	
	var url = jQuery("meta[name=tmpurl]").attr('content');
					
			jQuery.ajax({

				url: url + '/js/cloudfw_shortcodes.php',
				cache: false,
				type: "POST",
				data: ({selection: selection }),
				success: function(data) {
				
				
				main_container.html(data).hide().slideDown();
				loading_.hide();
				cloud_main();
				shortcodes_generator_tabs();
				
				
	
	
	
			jQuery("#sg_list_content, #sg_tabs_content")
			.sortable({opacity:  sortable_sliders_opacity,	axis: 'y', containment: 'parent', placeholder: 'sortable-placeholder', scroll:true, delay: 200,
			start: function(event, ui) {ui.item.addClass("removeBorder");},
			stop: function(event, ui) {ui.item.removeClass("removeBorder");}});

				
				
				
				
				}  
														
			});

	return false;

}


jQuery('.sendeditor').live('click',function(){send_code_tinymce_editor(jQuery(this)); return false;});


function close_shortcodes() {
	jQuery('.shortcodes_tabs').removeClass('actived'); loading_.hide();
	jQuery('#cloudfw_shortcode_main_container').slideUp();
	}
	
	
jQuery('.shortcodes_tabs_close').live('click',function(){
	close_shortcodes();
	return false;
});

jQuery('.addtabs').live('click',function(){
	
	tab_tree = jQuery('#sg_tabs_content');
	tab_tree_items = tab_tree.children('li');
	
	tab_tree.append(tab_tree_items.first().clone());

	tab_tree_items = tab_tree.children('li');
	tab_tree_items_last = tab_tree_items.last();

	tab_tree_items_last.find('.sg_tab_title').val('');
	tab_tree_items_last.find('.sg_tabs_content_remove_button').show();
	
	return false;
});

jQuery('.addlist').live('click',function(){
	
	tab_tree = jQuery('#sg_list_content');
	tab_tree_items = tab_tree.children('li');
	
	tab_tree.append(tab_tree_items.first().clone());

	tab_tree_items = tab_tree.children('li');
	tab_tree_items_last = tab_tree_items.last();

	tab_tree_items_last.find('.sg_list_cont').val('');
	tab_tree_items_last.find('.sg_list_content_remove_button').show();
	
	return false;
});

jQuery('.removetabs').live('click',function(){
	jQuery(this).parent('div').parent('li').remove();
	return false;
});

jQuery('.opento').live('click',function(){
	el = jQuery(this);
	id = el.attr('rel');
	id_el = jQuery('#'+id);
	
	if (id_el.css('display')=='none') id_el.slideDown(); else id_el.slideUp();
	
	cloudfw_get_icon_list_close();
	
	return false;
});


jQuery('.change_options').live('change',function(){
	el = jQuery(this);
	value = el.val();
	pfix = el.attr("pfix");
	hide_class = el.attr("hidethis");
	
	show_el = jQuery('.'+pfix+value);
	hide_el = jQuery('.'+hide_class).not('.'+pfix+value); hide_el.slideUp();
	show_el.slideDown();
	
});

jQuery('.addslideshow').live('click',function(){
	
	tab_tree = jQuery('#sg_slideshow');
	tab_tree_items = tab_tree.children('li');
	randomnumber= 'sg_slideshow_img_' + Math.floor(Math.random()*999999);
	
	tab_tree.append(tab_tree_items.first().clone());

	tab_tree_items = tab_tree.children('li');
	tab_tree_items_last = tab_tree_items.last();

	tab_tree_items_last.find('.sg_slideshow_img').val('').attr('id',randomnumber);
	tab_tree_items_last.find('a').attr('name',randomnumber);
	tab_tree_items_last.find('.sg_list_content_remove_button').show();
	
	cloud_main();
	
	return false;
});


jQuery('#sg_add_portfolio').live('click',function(){
	
	posts = "" + jQuery('#sg_port_sel_posts').val();
	selected_portfolio_items = jQuery('#selected_portfolio_items');
		
	if (posts != '') {
	
		var parsed_posts = posts.split(",");
		
			for(var i in parsed_posts)
			{
				var is_return_ = true;
				var title = jQuery('#sel-port-title-'+parsed_posts[i]).val();
				var thumbnail = jQuery('#sel-port-thumbnail-'+parsed_posts[i]).val();
				
				if (thumbnail == '') var thumbnail_echo = ''; else; var thumbnail_echo = '<img src="'+thumbnail+'" alt="" width="40" height="40" />';
				
				selected_portfolio_items.children('li').each(function(){
					
					var the_item = jQuery(this);
					var the_id = the_item.find('.portfolio_post_id').val();
					
					if ('' + the_id == '' + parsed_posts[i]) is_return_ = false;
					
					the_id = null;
					
				});
				
				if (is_return_ == false) return false;
				
				selected_portfolio_items.append('\
				\
				<li class="sortable_item">\
						\
						<div class="handler handler_left">\
                        	<span></span>\
                        </div>\
						<input type="hidden" name="p_id_'+parsed_posts[i]+'" class="portfolio_post_id" value="'+parsed_posts[i]+'">\
						<div style="float: left; margin-left: 20px; line-height: 30px;">'+thumbnail_echo+'</div>\
						<div style="float: left; margin-left: 20px; line-height: 30px;">'+title+' <a href="#" class="remove_portfolio">(remove)</a></div>\
						<div class="clear"></div>\
						\
						\
				</li>\
				\
				');
				
				
				title = null;
				thumbnail = null;
				is_return_ = null;
				
			}
			
			jQuery("#selected_portfolio_items")
				.sortable({opacity:  sortable_sliders_opacity,	axis: 'y', containment: 'parent', placeholder: 'sortable-placeholder', scroll:true, delay: 200,
				start: function(event, ui) {ui.item.addClass("removeBorder");},
				stop: function(event, ui) {ui.item.removeClass("removeBorder");}});
				
	}else{

		alert("Please Select Some Post");
	
	}

	
	return false;
});


jQuery('.remove_portfolio').live('click',function(){
	jQuery(this).parent('div').parent('li').remove();
	return false;
});




