function dropDrag(){
	console.log('page4 init');	
	$(".draggable").each(function(i, e) {
        var key = $(this).attr("data-dragkey");
		sg.setDraggable("[data-dragkey="+key+"]", {
			dropSelector: "[data-dropkey="+key+"]",
			revert: true,			
			success:function(){
				sg.sound("success-low");
				var drop = $("[data-dropkey="+key+"]");
				var position = drop.position();
				$(this).data("dropobjkey",key);					
				var clone = $(this).clone();
				drop.html(clone);
				clone.removeClass('draggable');
				clone.css({
					"top":"0", 
					"left":"0",
					"margin":"0"					
					});
				sg.destroyDraggable($(this));
				$( $(this) ).css({'background-color':'grey','cursor':'default'});													
				var resultado = dropCheck( '.draggable','.droppable');
				console.log(resultado);
				if( resultado ){ $("#ok").trigger("click"); }
			},
			fail: function(){ sg.sound("error"); }
			});
    });
}

function dropCheck( dragSelec , dropSelec ){	
		var dragObj = $( dragSelec ), 
			dropObj = $( dropSelec ), 
			error = 0;	
	
		dragObj.each(function() {			
			var dropKeyData = $(this).data("dropobjkey");
			if( typeof dropKeyData === 'undefined' ){			
				error++;
				console.log('false');										
				}
			});		
		if( error > 0 ){ return false }else{ return true }
}
