$(document).ready(function(){ 
						   
	$(function() {
		$("#radit").sortable({cursor: 'move', placeholder: 'radit_'+$("#radit").attr("kategorie"), opacity: 0.6,  update: function() {
			
				var order = $(this).sortable("serialize") + '&action=updateRecordsListings' + '&kategorie='+ $("#radit").attr("kategorie"); 
			
				$.post("hidepage/jquery_razeni.php", order, function(theResponse){
					$("#contentRight").html(theResponse);
				}); 															 
 			
		
    			},helper: 'clone'

			 ,start: function (e, ui) { 
				var cislo = ui.item.index()+1;
     			 	ui.placeholder.html(cislo);
				
				
    			},change: function (e, ui) { 
				var cislo = ui.item.index()+1;
				var pcislo = ui.placeholder.index();

				if (pcislo < cislo){
  					pcislo = pcislo +1;
  				}
     			 	
				ui.placeholder.html( pcislo);
				
    			}





						  
		});
		$("#radit div").mouseover(function(){
    			$(this).css('cursor','move');
		});
		$( "#radit" ).disableSelection();

	});


});	

