window.onload = init;
function init(){
	//new Draggable('list',{revert:false});
	Sortable.create("firstlist",{overlap:'horizontal',constraint:false});
	Sortable.create("puzzle",
     {tag:'img',overlap:'horizontal',constraint: false,
      onUpdate:function(){
        p = $("puzzle");
        p.moves = p.moves || 0;
        p.moves++;
        
        if(Sortable.serialize("puzzle")==
           "puzzle[]=1&puzzle[]=2&puzzle[]=3&" +
           "puzzle[]=4&puzzle[]=5&puzzle[]=6&" +
           "puzzle[]=7&puzzle[]=8&puzzle[]=9") {        
        }
      }
    })
}