    $(function() {        
        $("#thumbsimages").sortable({
					opacity: '0.4',
					update: function(e, ui){
						serial = $(this).sortable('serialize');	
						$.ajax({
							url: location.href,
							type: "POST",
							data: serial,
                                                        success: function(msg){
                                                            location=location.href;
                                                        }
						});
                                                
                                                
					}
				});


        $("#thumbsimages").disableSelection();


    
        $("#dialog").dialog({
                        autoOpen: false,
			bgiframe: true,
			resizable: false,
			height:200,
			modal: true,
			overlay: {
				backgroundColor: '#000',
				opacity: 0.9
			},
			buttons: {
				'Delete': function() {
                                        document.location = deleteimage;
                                        $(this).dialog('close');
				},
				Cancel: function() {
					$(this).dialog('close');
				}
			}
		});

    });

var deleteimage;	

function confirmDelete( path )
{
    deleteimage = path;
    $("#dialog").dialog("open");
    return;
}

