$(function(){
	var zindex = 10;
		var drop = function (event, ui) {
			var x = ui.draggable.data('value');
			var y = $(this).data('value');
			
			if (x === y) {			
					var top = $(this).position().top;
					var left = $(this).position().left;				
					$('#jplayer_well').jPlayer('play');
					ui.draggable.fadeOut(900);
					$('#this' + y).fadeIn(900);
			} else {
				$('#jplayer_wrong').jPlayer('play');
			}
		};
			
			
$('.pic').draggable({
	start: function () {
		zindex++;
		$(this).css('z-index', zindex);
	},
	revert: true,
	revertDuration: 800
});
$('.q').droppable({
	accept: ".pic",
	tolerance: "pointer",
	drop: drop
});
});
