jQuery(document).ready(function(){
	
	// Produits
	if( jQuery('body.catalog-product-view p.product-image a[rel="fancybox"]').length > 0 ) {
		var href = jQuery('body.catalog-product-view p.product-image a[rel="fancybox"]').attr('href');
		
		if( href != '' && href != '#' ) {
			jQuery('body.catalog-product-view p.product-image a[rel="fancybox"]').fancybox();
		}
	}
	
	if( jQuery('body.catalog-product-view div.more-views ul li a[rel="fancybox"]').length > 0 ) {
		var href = jQuery('body.catalog-product-view div.more-views ul li a[rel="fancybox"]').attr('href');
		
		if( href != '' && href != '#' ) {
			jQuery('body.catalog-product-view div.more-views ul li a[rel="fancybox"]').fancybox();
		}
	}
	
	
	
	// Plan d'accès
	if( jQuery('#boutiqueFirst a').length > 0 ) {
		//var map_boutique_1 = jQuery('#plan_acces_boutique_1 iframe').attr('src');
		
		//if( map_boutique_1 != '' ) {
			jQuery('#boutiqueFirst a').fancybox({
				/*
				onClosed: function() {
					jQuery('#plan_acces_boutique_1 iframe').attr('src', map_boutique_1);
				}
				*/
			});
		//}
	}
	
	if( jQuery('#boutiqueSecond a').length > 0 ) {
		//var map_boutique_2 = jQuery('#plan_acces_boutique_2 iframe').attr('src');
		
		//if( map_boutique_2 != '' ) {
			jQuery('#boutiqueSecond a').fancybox({
				/*			
				onClosed: function() {
					jQuery('#plan_acces_boutique_2 iframe').attr('src', map_boutique_2);
				}
				*/
			});
		//}
	}
	
	
	// Suivi de colis : compte utilisateur
	if( jQuery('div.my-account div.order-details h2.table-caption a').length > 0 ) {
		jQuery('div.my-account div.order-details h2.table-caption a').fancybox();
	}
	
	
	
	// Page nos boutiques
	if( jQuery('#cms-nos-boutiques').length > 0 ) {
	
		if( jQuery('#cms-nos-boutiques a[rel="fancybox"]').length > 0 ) {
			jQuery('#cms-nos-boutiques a[rel="fancybox"]').fancybox();
		}
	}
});

