 
 
 

 
 $(document).ready(function() {
	$('a.delete').click(function(e) {
		e.preventDefault();
		//var parent = $(this).parent();
		 var parent = $($(this).closest("tr"));
		//no confirm
		
		$.ajax({
			type: 'get',
			url: 'jquery-record-delete.php',
			data: 'ajax=1&delete=' + parent.attr('id').replace('record-',''),
			beforeSend: function() {
				parent.animate({'backgroundColor':'#fb6c6c'},300);
			},
			success: function() {
				parent.slideUp(300,function() {
					parent.remove();
				});
			}
		});
		
		//with confirm ??
		
		/*
		$('#dialog').dialog('open');
		  return false;
	    });
       $('#dialog').dialog({
	      autoOpen: false,
	      width: 300,
	      buttons: {
	         'Ok': function() {
	            $.ajax({
	    //can be post ?
		//type: 'post',
	                type: 'get',
	                url: 'jquery-record-delete.php',
	                data: 'ajax=1&delete=' + parent.attr('id').replace('record-',''),
	                beforeSend: function() {
	                      parent.animate({'backgroundColor':'#fb6c6c'},300);
					},
	                success: function() {
		               parent.slideUp(300,function() {
		                  parent.remove();
		               });
	                } //end success
	             }); //end ajax
	
	          $(this).dialog('close');
	         }, //end OK
	         Cancel: function() {
                $(this).dialog('close');
             }
          } //end buttons

      }); //end dialog
	   
	   */
   });//end with confirm */
 
   $('#faq').find('dd').hide().end().find('dt').click(function() {
     $(this).next().slideToggle();
   });
   $('.wymeditor').wymeditor({ logoHtml: '' });
 });
