jQuery(document).ready(function($){

		$('html').removeClass('no-js');

		// Cufon Font Replacement
		Cufon.replace('p.teaser, p.quoted-text, article.blog-entry p.short-details, div.agent-details h2', { fontFamily: 'helvetica_neue_45', hover: true});
		//, #slimline-footer .global-locations
		
		Cufon.replace('div.hero-copy h1, div.case-study-intro h1, .product-hero-copy h1, div.contact-hero-copy h1', { fontFamily: 'helvetica_neue_75', hover: true});
	
	

		// home page
		if (/\/intro.htm/.test(window.location))
		{
			$('body').attr('id','intro-splash');
			$('#site-content, #expanded-footer, a#expand-collapse-footer, #slimline-footer .network-connections').remove();
		}

		// HTML mark up
		$('ul > li:last-child').addClass('last');
		$('ul > li:first-child').addClass('first');
		$('#beavers, a#expand-collapse-footer').append('<em></em>');
		$('#site-search button').wrapInner('<span></span>');
		$('#expanded-footer, #hero-container').append('<div class="shadow-line-upper"></div><div class="shadow-line-lower"></div>');
		$('#slimline-footer .global-locations li:not(:last)').append('<em>|</em>');
		$('#site-map-content div.columnise ul li a').addClass('read-more');
		$('a.read-more').append('<em></em>');
		$('#site-content').append('<div class="clear"></div>');
		$('table.searchBox input[type="submit"]').addClass('rollover');

		
		// select skin
		//$('select.selectSkin:visible').select_skin();

		// jLabel
		$('input[type=text], input[type=password], textarea').jLabel();

		// rollover buttons
		$('button.rollover, input.rollover').hover(function(event) { $(this).addClass('over');}, function(event) { $(this).removeClass('over');});


		// quotes
		$('p.quoted-text').prepend('<em class="open-quote"></em>').append('<em class="close-quote"></em>');
		
		// Home Page Heros		
		$('ul.rotating-quotes').cycle(
		{
			fx: 'fade',
			speed: 1000,
			timeout: 10000,
			pause: 0,
			random: true, 
			cleartype: true,
			cleartypeNoBg: true
		});

		// Blockquotes
		$('div.columnise blockquote, div.full-details blockquote').addClass('dontsplit').each(function()
		{
			$('p:first-child').prepend('<em class="open-quote"></em>')
			$('p:last-child').append('<em class="close-quote"></em>')
		});

		
		// Home Page Heros		
		$('ul#rotating-heroes').cycle(
		{
			fx: 'scrollHorz',
			speed:		1000,
			timeout:	10000,
			pause: 1,
			cleartype: true,
			cleartypeNoBg: true,
			next:  '#next-hero', 
			prev:  '#previous-hero' 
		});

		// Show/Hide Footer Contacts
		$('a#expand-collapse-footer').click(function()
		{
			$(this).toggleClass('active');
			$('#expanded-footer ').slideToggle('slow');
		});
		

		// Home Page News Feed
		$('.news-feed-container h2:first-child a').prepend('<em></em>');		
		$('ul.news-feed li').append('<a class="click-through" href="javascript:;">Read more</a>');
		$('ul.news-feed li:nth-child(4)').addClass('last')
		$('ul.news-feed li:gt(3)').addClass('hidden');
		$('.news-feed-container p a.read-more').parent().addClass('hidden');
		$('.news-feed li .thumbnail').append('<span class="shadow"></span><span class="overlay"></span>');
		$('#site-map-content ul#agents-menu').parent().hide();
		
		if (/\/trading-desk-business-furniture-solutions.htm/.test(window.location))
		{			
			$('div.news-feed-container h2 a').click(function()
			{
				//$('ul.news-feed').toggleClass('expanded',300);
				$('div.news-feed-container').toggleClass('expanded',400);
				$('#home-heroes').toggleClass('collapsed',750);				
				return false;
			});
		}
		
		/*
		$('div.expanded ul.news-feed li:not(:has(.thumbnail))').each(function()
		{
			$('div.expanded ul.news-feed li h3, div.expanded ul.news-feed li p.short-details').css('marginLeft','67px')	
		});
		*/


		/* NEWS BLOG DEFINITIONS
		** ------------------------------------------------------------------------------------------
		*/
		
		//Page Links
		
		$('nav.page-links').append('<div class="clear"></div>'); 
		
		$('nav.page-links a:contains("Next")').each(function()
		{
			$(this).addClass('next-page').wrapInner('<span></span>').parent().css('border','none');
			$('nav.page-links').css('paddingRight','36px');
		});
		$('nav.page-links a:contains("Previous")').each(function()
		{
			$(this).addClass('prev-page').wrapInner('<span></span>').parent().css('border','none');
			$('nav.page-links').css('paddingLeft','50px');
		});
		
		//Blog Nav
		$('#blog-nav ul li a').prepend('<em></em>')

		$('a.latest-entries').prepend('<em></em>');
		
		$('p.categories:not(:empty)').prepend('<strong>Categories:</strong> ');
		$('p.categories:empty').remove();
		
		
		/* CASE STUDIES DEFINITIONS
		** ------------------------------------------------------------------------------------------
		*/
		
		$('#hero-content:has(#case-studies-results)').addClass('case-studies-container');
		$('#hero-content.case-studies-container .read-more').remove();	
		$('#case-studies-results').append('<div class="clear"></div>');
		$('.results-group ul li').append('<span class="shadow"></span><span class="overlay"></span></div>');

		/*

		$('#slideshow').serialScroll({
			items:'div.results-group',
			prev:'#screen2 a#prev',
			next:'#screen2 a#next',
			offset: 0, //when scrolling to photo, stop 230 before reaching it (from the left)
			start: 0, //as we are centering it, start at the 2nd
			duration:1200,
			force:true,
			stop:true,
			lock:false,
			cycle:false, //don't pull back once you reach the end
			easing:'easeOutQuart', //use this easing equation for a funny effect
			jump: true //click on the images to scroll to them
		});
		*/

		$('#case-studies-results').serialScroll({
			items:'div.results-group',
			prev:'#hero-content #previous-hero',
			next:'#hero-content #next-hero',
			offset: 0, //when scrolling to photo, stop 230 before reaching it (from the left)
			start: 0, //as we are centering it, start at the 2nd
			duration: 1200,
			force: true,
			stop: true,
			lock: false,
			cycle: false, //don't pull back once you reach the end
			easing: 'easeOutQuart', //use this easing equation for a funny effect
			jump: true //click on the images to scroll to them
		});
		
		$('#case-studies-results').each(function()
		{
			if ($('div.results-group').length < 2)
			{
				$('a#previous-hero, a#next-hero').hide();
			}
		});
		
		// Case Study Filters
		$('#case-study-filters li a').prepend('<em></em>');

		//$('#case-study-filters ul').css({display: 'none'}); // Opera Fix
		/* $('#case-study-filters li').hover(function()
		{
			$(this).find('ul:first').css({visibility: 'visible',display: 'none'}).slideUp(300);
		},function()
		{
			$(this).find('ul:first').css({visibility: 'hidden'});
		}); */
		
		$('#case-study-filters>li').hover(function()
		{
			$(this).children('ul').css('display','block');
		},function()
		{
			$(this).children('ul').css('display','none');
		});
		
		
		$('#hero-content:has(#page-hero)').each(function()
		{
			$('#hero-container div.shadow-line-lower').appendTo('#page-hero');
			$('#hero-container').css('background','#fff');
		});
		
		$('div.case-study-gallery').cycle(
		{
			fx: 'scrollHorz',
			pause:		1,
			speed:		1000,
			timeout:	10000,
			cleartype: true,
			cleartypeNoBg: true,
			next:  	'#next-hero', 
			prev:  	'#previous-hero' 
		});

		// Case Studies Side Nav
		$('a.go-back, .section-nav ul li a').prepend('<em></em>');
		
		$('.section-nav ul li:has(ul)').addClass('drop-down');
		
		$('#case-study-nav ul').hoverAccordion({
			keepHeight: true,
			//onClickOnly : true,
   		speed: 'fast'
   		});

		// Case Studies Articles
		$('#case-study-content h1, #case-study-content p.teaser, #product-content h1, #product-content p.teaser').prependTo('div.case-study-intro');

		$('article hr, div hr').replaceWith('<div class="ruled-line"></div>');
		
		$('ul.standard-list').addClass('dontsplit');
		
		$('div.columnise').columnize({width:277});


		/* SECTION HOME PAGE DEFINITIONS
		** ------------------------------------------------------------------------------------------
		*/
		$('ul.section-menu li a').prepend('<em></em>');
		
		$('ul.section-menu li ul#agents-menu').parent().remove();
		


		/* GLOBAL LOCATIONS DEFINITIONS
		** ------------------------------------------------------------------------------------------
		*/
		$('div.region-label').append('<span></span>').hide();
		$('div.region-label a').append('<em></em>');
		
		$('map').each(function()
		{
			var map = $(this);
			var areas = map.find('area');
			var current = {area: null, tooltip: null, pos: 0};
			
			areas.click(function(event)
			{
				event.preventDefault();
			});
			
			var showTooltip = function()
			{
				//$('div.region-label').stop(true, true).hide();
				
				current.tooltip.show();
				$('#world-maps').css('background-position','0 -'+current.pos+'px');
			};
			
			var hideTooltip = function()
			{
				current.tooltip.hide();
				$('#world-maps').css('background-position','0 0');
			};
			
			areas.hover(function(event)
			{
				var tmp = $(event.target).attr('href').split('#')[1];
				tmp = tmp.split('|');

				current.area = $(event.target);
				current.tooltip = $('#'+tmp[0]);
				current.pos = tmp[1];
				
				showTooltip();
			},
			function(event)
			{
				if (current.tooltip[0] == event.relatedTarget) { return;}

				hideTooltip();
			});

			$('div.region-label').mouseleave(function(event)
			{
				if (current.area[0] == event.relatedTarget) { return;}
				
				hideTooltip();
			});			
			
		});
		
		$('div.installations-list').prepend('<a href="javascript:;" class="closer"></a>');

   		$('div.region-label a').click(function()
   		{
   			$('div.installations-list.active').fadeOut();
   			$(this).parent().next('div.installations-list').each(function()
   			{
   				$(this).fadeIn('normal').addClass('active');
   			});
   		});
   		
   		$('div.installations-list a.closer').click(function()
   		{
   			$(this).parent().fadeOut();
   		});



		/* PRODUCT HOME PAGE DEFINITIONS
		** ------------------------------------------------------------------------------------------
		*/
		
		// $('div.product-hero-copy').append('<a class="previous-hero" href="javascript:;">Previous</a><a class="next-hero" href="javascript:;">Next</a>');
		
		$('ul#rotating-product').cycle(
		{
			fx: 'scrollHorz',
			speed:		1000,
			timeout:	0,
			pause: 1,
			cleartype: true,
			cleartypeNoBg: true,
			next:  'a.next-hero', 
			prev:  'a.previous-hero' 
		});

		$('div.product-hero-copy a.next-hero').click(function(){
			$('#product-discriptions div.product-content:visible').fadeOut().next('#product-discriptions div.product-content').fadeIn(700);
		});

		$('div.product-hero-copy a.previous-hero').click(function(){
			$('#product-discriptions div.product-content:visible').fadeOut().prev('#product-discriptions div.product-content').fadeIn(700);
		});

		/* $('#product-heroes').each(function(event)
		{
		});

		$('div.product-content').append('<div class="clear"></div>');
		
		$('a.product-info-reveal').click(function(event)
		{
			var link = $(this).attr('href').split('#')[1];

			$('div.product-content').slideUp(500);
			$('#'+link).slideDown(500);
		});

		$('#product-heroes a.previous-hero, #product-heroes a.next-hero').click(function()
		{
			$('div.product-content').slideUp(500);
		}); */


		/* CONTACT PAGE DEFINITIONS
		** ------------------------------------------------------------------------------------------
		*/
		
		// $('#contact-nav a.go-back').hide();
		
		$('ul.section-nav ul#agents-menu').parent().removeClass('drop-down').hide();

		if (/\/contact-us.htm/.test(window.location))
		{
			$('ul#agents-menu').parent().show();
		}

		if (/\/global-agents/.test(window.location))
		{
			$('ul#agents-menu').parent().show();
		}

		if (/\/feedback.htm/.test(window.location))
		{
			$('ul#agents-menu').parent().show();
		}

		$('#hero-content:has(#contact-hero)').each(function()
		{
			$('#case-study-nav').addClass('contact-nav');
		});
		
		$('div.agents-region').append('<div class="clear"></div>')
		$('#contact-content.contact-copy div.agent-details h2').prependTo('#contact-content');

		// Google Maps		
		$('#uk-sales').html('<iframe width="318" height="460" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=51.520778042386894,+-0.08165105463103828&amp;aq=&amp;sll=51.854879,0.095097&amp;sspn=0.040768,0.111494&amp;ie=UTF8&amp;ll=51.520814,-0.081882&amp;spn=0.024567,0.027208&amp;z=14&amp;output=embed"></iframe><p class="directions"><a href="http://maps.google.com/maps?f=q&amp;source=embed&amp;hl=en&amp;geocode=&amp;q=51.520778042386894,+-0.08165105463103828&amp;aq=&amp;sll=51.854879,0.095097&amp;sspn=0.040768,0.111494&amp;ie=UTF8&amp;ll=51.520814,-0.081882&amp;spn=0.024567,0.027208&amp;z=14" rel="external">View in Google Maps</a></p>');
		
		$('#saffron-walden').html('<iframe width="318" height="460" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.co.uk/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=52.0258062,+0.2570018000000118&amp;aq=&amp;sll=51.520787,-0.081797&amp;sspn=0.010361,0.027874&amp;g=51.52076886314433,+-0.08177175403670844&amp;ie=UTF8&amp;ll=52.02567,0.257149&amp;spn=0.012147,0.013604&amp;z=15&amp;output=embed"></iframe><p class="directions"><a href="http://maps.google.co.uk/maps?f=q&amp;source=embed&amp;hl=en&amp;geocode=&amp;q=52.0258062,+0.2570018000000118&amp;aq=&amp;sll=51.520787,-0.081797&amp;sspn=0.010361,0.027874&amp;g=51.52076886314433,+-0.08177175403670844&amp;ie=UTF8&amp;ll=52.02567,0.257149&amp;spn=0.012147,0.013604&amp;z=15" rel="external">View in Google Maps</a></p>');
		
		$('#hong-kong').html('<iframe width="318" height="460" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.co.uk/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=22.2758977,+114.18014570000003&amp;aq=&amp;sll=53.800651,-4.064941&amp;sspn=19.805845,67.631836&amp;ie=UTF8&amp;ll=22.275912,114.18005&amp;spn=0.036536,0.027208&amp;z=14&amp;output=embed"></iframe><p class="directions"><a href="http://maps.google.co.uk/maps?f=q&amp;source=embed&amp;hl=en&amp;geocode=&amp;q=22.2758977,+114.18014570000003&amp;aq=&amp;sll=53.800651,-4.064941&amp;sspn=19.805845,67.631836&amp;ie=UTF8&amp;ll=22.275912,114.18005&amp;spn=0.036536,0.027208&amp;z=14" rel="external">View in Google Maps</a></p>');

		$('#usa').html('<iframe width="318" height="460" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=40.6530685,+-74.3041915&amp;sll=37.0625,-95.677068&amp;sspn=50.69072,114.169922&amp;ie=UTF8&amp;ll=40.653099,-74.304571&amp;spn=0.029954,0.027208&amp;z=14&amp;output=embed"></iframe><br /><p><a href="http://maps.google.com/maps?f=q&amp;source=embed&amp;hl=en&amp;geocode=&amp;q=40.6530685,+-74.3041915&amp;sll=37.0625,-95.677068&amp;sspn=50.69072,114.169922&amp;ie=UTF8&amp;ll=40.653099,-74.304571&amp;spn=0.029954,0.027208&amp;z=14" rel="external">View in Google Maps</a></p>');

		$('#dubai').html('<iframe width="318" height="460" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=25.2644444,+55.31166669999993&amp;aq=&amp;sll=40.6531,-74.3045&amp;sspn=0.011965,0.027874&amp;ie=UTF8&amp;ll=25.263715,55.311613&amp;spn=0.035706,0.027208&amp;z=14&amp;output=embed"></iframe><br /><small><a href="http://maps.google.com/maps?f=q&amp;source=embed&amp;hl=en&amp;geocode=&amp;q=25.2644444,+55.31166669999993&amp;aq=&amp;sll=40.6531,-74.3045&amp;sspn=0.011965,0.027874&amp;ie=UTF8&amp;ll=25.263715,55.311613&amp;spn=0.035706,0.027208&amp;z=14" rel="external">View in Google Maps</a></p>');

		$('#moscow').html('<iframe width="318" height="460" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=55.7740616,+37.590441000000055&amp;aq=&amp;sll=25.26374,55.311667&amp;sspn=0.007131,0.013937&amp;ie=UTF8&amp;ll=55.773918,37.590322&amp;spn=0.022207,0.02738&amp;z=14&amp;output=embed"></iframe><br /><small><a href="http://maps.google.com/maps?f=q&amp;source=embed&amp;hl=en&amp;geocode=&amp;q=55.7740616,+37.590441000000055&amp;aq=&amp;sll=25.26374,55.311667&amp;sspn=0.007131,0.013937&amp;ie=UTF8&amp;ll=55.773918,37.590322&amp;spn=0.022207,0.02738&amp;z=14" rel="external">View in Google Maps</a></p>');

		$('#singapore').html('<iframe width="318" height="460" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=1.3350924,+103.88467579999997&amp;aq=&amp;sll=55.773913,37.590286&amp;sspn=0.008871,0.027874&amp;ie=UTF8&amp;ll=1.335147,103.884745&amp;spn=0.039471,0.027208&amp;z=14&amp;output=embed"></iframe><br /><small><a href="http://maps.google.com/maps?f=q&amp;source=embed&amp;hl=en&amp;geocode=&amp;q=1.3350924,+103.88467579999997&amp;aq=&amp;sll=55.773913,37.590286&amp;sspn=0.008871,0.027874&amp;ie=UTF8&amp;ll=1.335147,103.884745&amp;spn=0.039471,0.027208&amp;z=14" rel="external">View in Google Maps</a></p>');

		$('#sydney').html('<iframe width="318" height="460" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=-33.8657305,+151.20732999999996&amp;aq=&amp;sll=1.335137,103.884817&amp;sspn=0.007884,0.013937&amp;ie=UTF8&amp;ll=-33.865712,151.207237&amp;spn=0.032784,0.027208&amp;z=14&amp;output=embed"></iframe><br /><small><a href="http://maps.google.com/maps?f=q&amp;source=embed&amp;hl=en&amp;geocode=&amp;q=-33.8657305,+151.20732999999996&amp;aq=&amp;sll=1.335137,103.884817&amp;sspn=0.007884,0.013937&amp;ie=UTF8&amp;ll=-33.865712,151.207237&amp;spn=0.032784,0.027208&amp;z=14" rel="external">View in Google Maps</a></p>');

		$('#tokyo').html('<iframe width="318" height="460" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=35.6894875,+139.69170639999993&amp;aq=&amp;sll=-33.865729,151.207301&amp;sspn=0.006548,0.013937&amp;ie=UTF8&amp;ll=35.689161,139.691591&amp;spn=0.032067,0.027208&amp;z=14&amp;output=embed"></iframe><br /><small><a href="http://maps.google.com/maps?f=q&amp;source=embed&amp;hl=en&amp;geocode=&amp;q=35.6894875,+139.69170639999993&amp;aq=&amp;sll=-33.865729,151.207301&amp;sspn=0.006548,0.013937&amp;ie=UTF8&amp;ll=35.689161,139.691591&amp;spn=0.032067,0.027208&amp;z=14" rel="external">View in Google Maps</a></p>');

		$('div.google-map p.directions').each(function()
		{
			$('p.directions a').addClass('read-more').append('<em></em>');
			$(this).appendTo('div.agent-details')
		});
				
		
		// Accordion Content
		$('div.accordion-content').append('<div class="clear"></div>');
		
		$('div.accordion-container h2 a').prepend('<span></span>');
		$('div.accordion-container h2').click(function()
		{
			$('div.accordion-container h2').removeClass('active');
			$('div.accordion-content').slideUp(1000);
			if ($(this).next('div.accordion-content').is(':hidden') == true)
			{
				$(this).addClass('active');
				$(this).next('div.accordion-content').slideDown(1000);
			}
		});
		
		$('div.accordion-content').hide();



		/* SEARCH DEFINITIONS
		** ------------------------------------------------------------------------------------------
		*/
		
		//Page Links
		
		$('#other_pages').append('<div class="clear"></div>'); 
		
		$('#other_pages a:contains("Next")').each(function()
		{
			$(this).addClass('next-page').wrapInner('<span></span>');
			$('#other_pages').css('paddingRight','36px');
		});
		$('#other_pages a:contains("Previous")').each(function()
		{
			$(this).addClass('prev-page').wrapInner('<span></span>');
			$('#other_pages').css('paddingLeft','36px');
		});


		$('table.searchBox').attr('cellspacing','0').attr('cellpadding','0');
		



		
		
		/* OTHER DEFINTIONS
		** ------------------------------------------------------------------------------------------
		*/

		// tabbed navigation
		$('ul.tabNav li a').click(function()
		{
			var curChildIndex = $(this).parent().prevAll().length + 1;
			$(this).parent().parent().children('.active').removeClass('active');
			$(this).parent().addClass('active');
			$(this).parent().parent().next('.tabContainer').children('.active').fadeOut('fast',function()
			{
				$(this).removeClass('active');
				$(this).parent().children('div:nth-child('+curChildIndex+')').fadeIn('normal',function()
				{
					$(this).addClass('active');
				});
			});
			return false;
		});

		// Animated Page Scrolling
		$('.scrollPage').click(function() 
		{
			var elementClicked = $(this).attr('href');
			var destination = $(elementClicked).offset().top;
			$('html:not(:animated),body:not(:animated)').animate({ scrollTop: destination-15}, 750 );
			return false;
		});

		// addThis
		$('.bookmarkIt').html('<p>add this here!</p>');

		// Form Validtion
		$('#feedback-form').validate(
		{
			messages: {
				firstName: 	'Please enter your name',
				surname:	'Please enter your surname',
				company:	'Please enter your company name',
				tel: 		'Please enter your phone number, including international dialing codes',
				address1: 	'Please enter the first line of your address',
				town: 		'Please enter your city of residence',
				county: 	'Please enter your state or county',
				postcode: 	'Please enter a post code or zip',
				country: 	'Please enter your country',
				email: {
					required:	'Please provide an email address',
					email: 'Example: name@domain.com'
				}
			}
		});

		$('#application-form').validate(
		{
			messages: {
				firstName: 	'Please enter your name',
				surname:	'Please enter your surname',
				tel: 		'Please enter your phone number, including international dialing codes',
				address1: 	'Please enter the first line of your address',
				town: 		'Please enter your city of residence',
				county: 	'Please enter your state or county',
				postcode: 	'Please enter a post code or zip',
				country: 	'Please enter your country',
				email: {
					required:	'Please provide an email address',
					email: 'Example: name@domain.com'
				}
			}
		});


		// Make Whole Element a Link
		$('div.results-group ul li, ul.news-feed li').click(function(event)
		{
			var href = $(this).find('a:first').attr('href');
			if (!href) { return ;}
			location.href = href;
		});

		// External Links
		$('a[href^="http:"], a[href^="https:"]').not('[href*="'+location.hostname+'"]').attr('target', '_blank');
		$('a[rel=external]').attr('target', '_blank');
		//$('a.mailto').each(function() { lbb.helpers.mailto(this);});


		// Emails
		$('a.mailto').each(function(i)
		{
			var etext = $(this).text();
			var address = etext.replace('__AT__', '@').replace('__DOT__', '.');
		
			$(this).attr('href', 'mailto:' + address);
			$(this).text(address);
		});
		
		$('a.mail-it').each(function(i)
		{
			var etext = $(this).attr('data-eurl');
			var address = etext.replace('__AT__', '@').replace('__DOT__', '.');
		
			$(this).attr('href', 'mailto:' + address);
		});


});


// html5shiv MIT @rem remysharp.com/html5-enabling-script
// iepp v1.6.2 MIT @jon_neal iecss.com/print-protector
/*@cc_on(function(m,c){var z="abbr|article|aside|audio|canvas|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video";function n(d){for(var a=-1;++a<o;)d.createElement(i[a])}function p(d,a){for(var e=-1,b=d.length,j,q=[];++e<b;){j=d[e];if((a=j.media||a)!="screen")q.push(p(j.imports,a),j.cssText)}return q.join("")}var g=c.createElement("div");g.innerHTML="<z>i</z>";if(g.childNodes.length!==1){var i=z.split("|"),o=i.length,s=RegExp("(^|\\s)("+z+")",
"gi"),t=RegExp("<(/*)("+z+")","gi"),u=RegExp("(^|[^\\n]*?\\s)("+z+")([^\\n]*)({[\\n\\w\\W]*?})","gi"),r=c.createDocumentFragment(),k=c.documentElement;g=k.firstChild;var h=c.createElement("body"),l=c.createElement("style"),f;n(c);n(r);g.insertBefore(l,
g.firstChild);l.media="print";m.attachEvent("onbeforeprint",function(){var d=-1,a=p(c.styleSheets,"all"),e=[],b;for(f=f||c.body;(b=u.exec(a))!=null;)e.push((b[1]+b[2]+b[3]).replace(s,"$1.iepp_$2")+b[4]);for(l.styleSheet.cssText=e.join("\n");++d<o;){a=c.getElementsByTagName(i[d]);e=a.length;for(b=-1;++b<e;)if(a[b].className.indexOf("iepp_")<0)a[b].className+=" iepp_"+i[d]}r.appendChild(f);k.appendChild(h);h.className=f.className;h.innerHTML=f.innerHTML.replace(t,"<$1font")});m.attachEvent("onafterprint",
function(){h.innerHTML="";k.removeChild(h);k.appendChild(f);l.styleSheet.cssText=""})}})(this,document);@*/
