if ( (navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)) || (navigator.userAgent.match(/Android/i)) || (navigator.userAgent.match(/Windows Phone/i))|| (navigator.userAgent.match(/blackberry/i))) { 
		if (document.cookie.indexOf("iphone_redirect=false") == -1) window.location = "http://m.hotelmontmartre-paris.com/fr/"; 
	}
	
$(document).ready(function() {

	$('#Nivoslider').nivoSlider({
		effect:'fade', //Specify sets like: 'fold,fade,sliceDown'
		slices:45,
		animSpeed:500,
		pauseTime:5000,
		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
	});
					
  $('.switchlanguage').click(function() {
		  $('.alllanguages').stop(true,true);
		  $('.alllanguages').slideToggle('slow');
		  return false;
	  });
	$('.selecter').mobilyselect({
		collection: 'hotel',
		animation: 'fade',
		duration: 300,
		listClass: 'selecterContent',
		btnsClass: 'selecterBtns',
		btnActiveClass: 'active',
		elements: 'li',
		onChange: function(){},
		onComplete: function(){}
	});
							
	function formatTitle1(title, currentArray, currentIndex, currentOpts) {
		return'<div class="boxfancyconteneur"><table width="100%"><tr><td valign="middle" align="right" style="padding:0 0 0 100px;"><p>'+title+'</p></td></tr></table></div>';
	}
	
	$("a[rel=DiapoHotel]").fancybox({
		'transitionIn' : 'none',
		'transitionOut' : 'none',
		'titleFormat'		: formatTitle1,
		'titlePosition' 	: 'over',
		'titleShow'			: true,
		'overlayOpacity'	: 0.8,
		'overlayColor'		: '#2C0406'
	});
	$("a[rel=DiapoChambres]").fancybox({
		'transitionIn' : 'none',
		'transitionOut' : 'none',
		'titleFormat'		: formatTitle1,
		'titlePosition' 	: 'over',
		'titleShow'			: true,
		'overlayOpacity'	: 0.8,
		'overlayColor'		: '#2C0406'
	});
	$("a[rel=DiapoServices]").fancybox({
		'transitionIn' : 'none',
		'transitionOut' : 'none',
		'titleFormat'		: formatTitle1,
		'titlePosition' 	: 'over',
		'titleShow'			: true,
		'overlayOpacity'	: 0.8,
		'overlayColor'		: '#2C0406'
	});
	$("a[rel=DiapoRestaurant]").fancybox({
		'transitionIn' : 'none',
		'transitionOut' : 'none',
		'titleFormat'		: formatTitle1,
		'titlePosition' 	: 'over',
		'titleShow'			: true,
		'overlayOpacity'	: 0.8,
		'overlayColor'		: '#2C0406'
	});
	$("a[rel=Single]").fancybox({
		'transitionIn' : 'none',
		'transitionOut' : 'none',
		'titleFormat'		: formatTitle1,
		'titlePosition' 	: 'over',
		'titleShow'			: true,
		'overlayOpacity'	: 0.8,
		'overlayColor'		: '#2C0406'
	});
	$("a[rel=Double]").fancybox({
		'transitionIn' : 'none',
		'transitionOut' : 'none',
		'titleFormat'		: formatTitle1,
		'titlePosition' 	: 'over',
		'titleShow'			: true,
		'overlayOpacity'	: 0.8,
		'overlayColor'		: '#2C0406'
	});
	$("a[rel=Twin]").fancybox({
		'transitionIn' : 'none',
		'transitionOut' : 'none',
		'titleFormat'		: formatTitle1,
		'titlePosition' 	: 'over',
		'titleShow'			: true,
		'overlayOpacity'	: 0.8,
		'overlayColor'		: '#2C0406'
	});
	$("a[rel=Services]").fancybox({
		'transitionIn' : 'none',
		'transitionOut' : 'none',
		'titleFormat'		: formatTitle1,
		'titlePosition' 	: 'over',
		'titleShow'			: true,
		'overlayOpacity'	: 0.8,
		'overlayColor'		: '#2C0406'
	});
	$("a[rel=PlanParis]").fancybox({
		'transitionIn' : 'none',
		'transitionOut' : 'none',
		'titleFormat'		: formatTitle1,
		'titlePosition' 	: 'over',
		'titleShow'			: true,
		'overlayOpacity'	: 0.8,
		'overlayColor'		: '#2C0406'
	});
	$("a[rel=GoogleMaps]").fancybox({
		'titleFormat'		: formatTitle1,
		'overlayOpacity'	: 0.8,
		'overlayColor'		: '#2C0406',
		'width'				: '75%',
		'height'			: '75%',
        'autoScale'     	: false,
        'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'type'				: 'iframe'
	});

});
