// Using multiple unit types within one animation.


$(document).ready(function(){
	jQuery(".facebookIcon").toggle(
	  function(){
	    jQuery(".facebook").animate({
	  	  left:'+=312'
	    }, 750 );
	    jQuery('.facebook').css("z-index", "100");
		jQuery(".facebookIcon").css("background-image", "url(fileadmin/img/socialClose.png)");

	  },

	  function(){
	    jQuery(".facebook").animate({
	  	  left:'-=312'
	    }, 750 );
	    jQuery('.facebook').css("z-index", "95");
		jQuery(".facebookIcon").css("background-image", "url(fileadmin/img/facebook.png)");

	  }

	);
})


function browsercheck(){
	var b=navigator.userAgent.toLowerCase();
	namen=['Mobile', 'iPhone', 'Android', 'symbian', 'htc', 'msiem', 'nokia'];
	for(var c=namen.length,a=0;a<c;a++)	
		if(-1<b.indexOf(namen[a].toLowerCase()))return!0;return!1};


		function show_confirm()
		{
		var r=confirm("Wollen Sie zur Mobilen Website von Hotel Daniem wechseln?");
		if (r==true)
		  {
			window.stop()
		  window.location.replace('http://www.hotel-daniel.com/mobile')
		  }
		else
		  {
		  // alert("You pressed Cancel!");
		  }
		}

if (browsercheck()) {
	show_confirm()
};
