// JavaScript Document
	// rotating opening times
	function startOpeningTimes() 
	{
		var headline_count;
		var headline_interval;
		var old_headline = 0;
		var current_headline = 0;
		$(document).ready(function()
		{
			headline_count = $("div.messagemain").size();
			$("div.messagemain:eq("+current_headline+")").css('top', '0');
			
			headline_interval = setInterval(headline_rotate,8000); //time in milliseconds
			$('#openingtimestop').focus(function() 
			{
				clearInterval(headline_interval);
			}, 
			
			function() 
			{
				headline_interval = setInterval(headline_rotate,8000); //time in milliseconds
				headline_rotate();
			});
		});
		
		function headline_rotate() 
		{			
		   current_headline = (old_headline + 1) % headline_count; //remainder will always equal old_headline until it reaches headline_count - at which point it becomes zero. clock arithmetic
		   $("div.messagemain:eq(" + old_headline + ")").animate({top: 80},"slow", function() 
			{
			 	$(this).css('top','90px');
		   	});
		   $("div.messagemain:eq(" + current_headline + ")").show().animate({top: 0},"slow");  
		   old_headline = current_headline;	
		}
	}

///**********************************************************

	// AMS Clicktags
		function homepageclicktag()
		{
			var axel = Math.random()+"";
			var a = axel * 10000000000000;
			document.write('<IFRAME SRC="http://fls.uk.doubleclick.net/activityi;src=2288425;type=queen495;cat=homep387;ord=1;num=\'+ a + \'?" WIDTH=1 HEIGHT=1 FRAMEBORDER=0 ID="hideframe"><\/IFRAME>');
		}
		
		function ourshopsclicktag()
		{
			var axel = Math.random()+"";
			var a = axel * 10000000000000;
			document.write('<IFRAME SRC="http://fls.uk.doubleclick.net/activityi;src=2288425;type=queen495;cat=oursh977;ord=1;num=\'+ a + \'?" WIDTH=1 HEIGHT=1 FRAMEBORDER=0 ID="hideframe"><\/IFRAME>');
		}
		
		function newseventsclicktag()
		{
			var axel = Math.random()+"";
			var a = axel * 10000000000000;
			document.write('<IFRAME SRC="http://fls.uk.doubleclick.net/activityi;src=2288425;type=queen495;cat=newse159;ord=1;num=\'+ a + \'?" WIDTH=1 HEIGHT=1 FRAMEBORDER=0 ID="hideframe"><\/IFRAME>');
		}
		
		function gettinghereclicktag()
		{
			var axel = Math.random()+"";
			var a = axel * 10000000000000;
			document.write('<IFRAME SRC="http://fls.uk.doubleclick.net/activityi;src=2288425;type=queen495;cat=getti450;ord=1;num=\'+ a + \'?" WIDTH=1 HEIGHT=1 FRAMEBORDER=0 ID="hideframe"><\/IFRAME>');
		}
		
		function contactusclicktag()
		{
			var axel = Math.random()+"";
			var a = axel * 10000000000000;
			document.write('<IFRAME SRC="http://fls.uk.doubleclick.net/activityi;src=2288425;type=queen495;cat=conta482;ord=1;num=\'+ a + \'?" WIDTH=1 HEIGHT=1 FRAMEBORDER=0 ID="hideframe"><\/IFRAME>');
		}
		
		function openhoursclicktag()
		{
			var axel = Math.random()+"";
			var a = axel * 10000000000000;
			document.write('<IFRAME SRC="http://fls.uk.doubleclick.net/activityi;src=2288425;type=queen495;cat=openi203;ord=\'+ a + \'?" WIDTH=1 HEIGHT=1 FRAMEBORDER=0 ID="hideframe"></IFRAME>');

		}
		
		function registerclicktag()
		{
			var axel = Math.random()+"";
			var a = axel * 10000000000000;
			document.write('<IFRAME SRC="http://fls.uk.doubleclick.net/activityi;src=2288425;type=queen495;cat=regis090;ord=\'+ a + \'?" WIDTH=1 HEIGHT=1 FRAMEBORDER=0 ID="hideframe"></IFRAME>');
		}
		
		function regconfirmationclicktag()
		{
			var axel = Math.random()+"";
			var a = axel * 10000000000000;
			document.write('<IFRAME SRC="http://fls.uk.doubleclick.net/activityi;src=2288425;type=queen495;cat=regis325;ord=\'+ a + \'?" WIDTH=1 HEIGHT=1 FRAMEBORDER=0 ID="hideframe"></IFRAME>');
		}
		
//*		
		function clicktags()
		{
			// /rest of url
			urlpath = window.location.pathname;
		
			urladdress = window.location.protocol + "//" + window.location.host + urlpath;
			
			if (urlpath == "/")
			{
				homepageclicktag();
			}
			else if(urlpath == "/our-shops/")
			{
				//alert(urladdress);
				ourshopsclicktag();
			}
			else if(urlpath == "/news-and-events/")
			{
				newseventsclicktag();
			}
			else if(urlpath == "/getting-to-queensgate/")
			{
				gettinghereclicktag();
			}
			else if(urlpath == "/customer-services/thanks-for-your-feedback/")
			{
				contactusclicktag();
			}
			else if(urlpath == "/opening-hours/")
			{
				openhoursclicktag();
			}
			else if(urlpath == "/your-account/register/")
			{
				registerclicktag();
			}
			else if(urlpath == "/your-account/successfully-registered/")
			{
				regconfirmationclicktag();
			}
		}

///**********************************************************