var $obiwi = jQuery.noConflict();

$obiwi(document).ready(function() {
	$obiwi(".inline_edit .clickme").click(function() {
		$obiwi(this).parent().children(".configuration").slideToggle();
	});
	
	// peuple le hidden input avec l'ordre d'apparition des blocs
	if ($obiwi(".ZoneReorderList").length) {
		$obiwi(".zone").sortable({
			stop: function(event, ui) {
				var arr=$obiwi.makeArray($obiwi(this).parents('div.container').find(".zone .block .bloc_id"));
				var ReorderedList = $obiwi.map(arr, function(n,i) {return $obiwi(n).val();});
				$obiwi(this).parents('div.container').find('.ZoneReorderList').val(ReorderedList);
			}
		});
	}
	

});
