	// Add Google Analytics
	var _gaq = _gaq || [];
	_gaq.push(['_setAccount', 'UA-16020509-1']);
	_gaq.push(['_trackPageview']);

	(function() {
		var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
		ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
		var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
	})();


jQuery(function($) {
	// turn caching on
	jQuery.ajaxSetup({ cache: true });

	// Load corner script
		$.getScript('/js/jquery.corner.js', function() {
			$('#menu ul li').corner('bottom');
			$('#submenu ul li').corner()
			if ($('.msg').length > 0) {
				$('.msg').corner()
			}
		});

	// Check if we need a shadowbox
	if ($('a.shadowbox').length > 0) {
		Shadowbox.init({skipSetup: true});
		Shadowbox.setup('a.shadowbox', {gallery: 'images'});
	}

	// If referrer is not in the same domain
	// slide the header & footer down
	if (document.referrer.indexOf(document.domain) == -1) {
		// First hide the header and footer
		$('#header').hide();
		$('#footer').hide();
		$('#menu').css('margin-right','10px');
		$('#submenu').css('margin-right','10px');
		$('#header').slideDown(1000, function() {
			$('#menu').animate({'marginRight': '+=90px'}, 1000);
			$('#submenu').animate({'marginRight': '+=65px'}, 1000);
		});
		$('#footer').slideDown(1250);
	}

});

