﻿/* Google Analytics */
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-3754462-46']);
_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);
})();

/* Onload Functions */
$(document).ready(function () {

	/* Add symbol in front of all "add" links in author mode */
	if ($('a.ms-addnew').length > 0) {
		$('a.ms-addnew').each(
			function (idx, obj) {
				var $this = $(this);
				$this.html('&raquo; ' + $this.html());
			}
		);
	}

	/* Add shadows to homepage link banners */
	if ($('.sl-HomeLinks').length > 0) {
		$('.sl-HomeLinks .sl-HomeLinksBox').each(
			function (idx, obj) {
				$(this).append($('<div></div>').addClass('sl-Shadow-Small-Right'));
			}
		);
	}
	
	/* Styling updates for :last-child selector in <= IE8 */
	if ($.browser.msie && ($.browser.version <= 8)) {
		$('.sl-HomeLinks .sl-HomeLinksBox:last-child').css('margin-bottom', '40px');
		$('.sl-TopNav li li:last-child, .sl-TopNav li.selected li:last-child').css('border-bottom-color', 'transparent');
		$('.srch-maintop2 .s4-wpTopTable:last-child .ms-WPBody').css('border-top', '1px solid #c8ebef');
	}

});
