jQuery.noConflict();
jQuery(document).ready(
	function() {
		// ----- Chargement des lightBox sur les image avec  "Click-enlarge" checké-- //
		var imageLien = jQuery('a[target="thePicture"]');
		var A_lien = '';
		if (imageLien) {
			imageLien.each(
				function (){
					jQuery(this).removeAttr('onclick');
					jQuery(this).attr('rel','lightbox');
					jQuery('img',jQuery(this)).attr('rel','lightbox');
					A_lien = getUrlVars(decodeURIComponent(jQuery(this).attr('href')));
					jQuery(this).attr('href', A_lien['file']);
				}
			);
			imageLien.lightBox({
				overlayBgColor: '#000',
				overlayOpacity: 0.8,
				imageLoading:	'typo3conf/ext/sinto/res/templates/v2/lib/img/lightbox/lightbox-ico-loading.gif',
				imageBtnClose:	'typo3conf/ext/sinto/res/templates/v2/lib/img/lightbox/lightbox-btn-close.gif',
				imageBtnPrev:	'typo3conf/ext/sinto/res/templates/v2/lib/img/lightbox/lightbox-btn-prev.gif',
				imageBtnNext:	'typo3conf/ext/sinto/res/templates/v2/lib/img/lightbox/lightbox-btn-next.gif',
				imageBlank:		'typo3conf/ext/sinto/res/templates/v2/lib/img/lightbox/lightbox-blank.gif',
				containerResizeSpeed: 350,
				txtImage: 'Image',
				txtOf: 'de'
			});
		}
	}
);

//recuperation des variables dans les URL de type Get dans un array
function getUrlVars(url)
{
    var vars = [], hash;
    var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
    if(url) {
    	hashes = url.slice(url.indexOf('?') + 1).split('&');
    }
    for(var i = 0; i < hashes.length; i++)
    {
        hash = hashes[i].split('=');
        vars.push(hash[0]);
        vars[hash[0]] = hash[1];
    }
    return vars;
}