// JavaScript Document

$(document).ready(function() {

	$('.nivoslider').nivoSlider({
		effect:'fade', //Specify sets like: 'fold,fade,sliceDown'
		slices:45,
		animSpeed:500,
		pauseTime:3500,
		startSlide:0, //Set starting Slide (0 index)
		directionNav:true, //Next & Prev
		directionNavHide:true, //Only show on hover
		controlNav:true, //1,2,3...
		controlNavThumbs:false, //Use thumbnails for Control Nav
		controlNavThumbsFromRel:false, //Use image rel for thumbs
		controlNavThumbsSearch: '.jpg', //Replace this with...
		controlNavThumbsReplace: '_thumb.jpg', //...this in thumb Image src
		keyboardNav:true, //Use left & right arrows
		pauseOnHover:true, //Stop animation while hovering
		manualAdvance:false //Force manual transitions
	});
		
	$("a#imgp01").wrapInner(document.createElement("span"));
      $("a#imgp01 span").css("opacity","0");

	
      $("a#imgp01 span").hover(function () {
			// animate opacity to full
			$(this).stop().animate({
				 opacity: 1
			}, "fast");
		},
		 function () {
			$(this).stop().animate({
				 opacity: 0
			}, "slow");
		});
	  
	  $("a#imgp02").wrapInner(document.createElement("span"));
      $("a#imgp02 span").css("opacity","0");

	
      $("a#imgp02 span").hover(function () {
			// animate opacity to full
			$(this).stop().animate({
				 opacity: 1
			}, "fast");
		},
		 function () {
			$(this).stop().animate({
				 opacity: 0
			}, "slow");
		});
		
	$("a[rel=carte]").fancybox({
		'overlayOpacity'	: 0.7,
		'overlayColor'		: '#736A62',
        'autoScale'     	: true,
        'transitionIn'		: 'none',
		'transitionOut'		: 'none'
	});		
	
	$("a[rel=googlemaps]").fancybox({
		'overlayOpacity'	: 0.7,
		'overlayColor'		: '#736A62',
		'width'				: '75%',
		'height'			: '75%',
        'autoScale'     	: false,
        'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'type'				: 'iframe'
	});
	
	$("a[rel=photo]").fancybox({
		'overlayOpacity'	: 0.7,
		'overlayColor'		: '#736A62',
        'autoScale'     	: true,
        'transitionIn'		: 'none',
		'transitionOut'		: 'none'
	});
	
	$("a[rel=Video]").fancybox({
		'width'				: '75%',
		'height'			: '75%',
        'autoScale'     	: false,
        'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'type'				: 'iframe'
	});
});	
