var $j = jQuery.noConflict();

$j(function() {
/*	var params={
			imageLoading:			basedir+'images/lightbox-ico-loading.gif',		// (string) Path and the name of the loading icon
			imageBtnPrev:			basedir+'images/lightbox-btn-prev.gif',			// (string) Path and the name of the prev button image
			imageBtnNext:			basedir+'images/lightbox-btn-next.gif',			// (string) Path and the name of the next button image
			imageBtnClose:			basedir+'images/lightbox-btn-close.gif',		// (string) Path and the name of the close btn
			imageBlank:				basedir+'images/lightbox-blank.gif',
			txtOf: 'sur',
	};
	$j('a.lightbox').lightBox(params);*/
	
	var params={
		'imageScale':true,
		'zoomSpeedIn':		600, 
		'zoomSpeedOut':	500, 
		'overlayShow':		false,
		'easingIn'				: 'easeOutBack',
		'easingOut'				: 'easeInBack'
	
	};
	$j('a.lightbox').fancybox(params);
	params.overlayShow=true;
	$j('a.iframe').fancybox(params);
	
	if ($j(".save_order").length) {
		$j(".liste_galerie .images").sortable({
			stop: function() {
				var order='';
				$j(".liste_galerie .images .image_item").each(function(){
					if (order) {
						order=order+',';
					};
					var tab=$j(this).attr('id').split('_');
					order=order+tab[1];
				});
				$j(".saved_data").val(order);
			},
		});
		$j(".liste_galerie .galeries").sortable({
			stop: function() {
				var order='';
				$j(".liste_galerie .galeries .galerie_item").each(function(){
					if (order) {
						order=order+',';
					};
					var tab=$j(this).attr('id').split('_');
					order=order+tab[1];
				});
				$j(".saved_data2").val(order);
			},
		});
	}
});