/* Declare a namespace for the site */
var Site = window.Site || {};
(function($) {
	
	$(function() {
		$(".odd-row-js").each(function() {
			$(this).find("tr:odd").addClass("odd");
		});
		
		$(".detail-table-style").each(function() {
			$(this).find("tr:odd").addClass("odd");
		});
		
		$(".facetting-list").each(function() {
			$(this).find("li:last").addClass("rounded-bottom");
		});
		
		//center loading progressbar at bottom of container(s)
		$("div[id$='View_UP_Prog']").each(function() {
			var loader = $(this).find("img:first");
			
			var type = $("#header").hasClass("application") ? "app" : "pub";
			
			var headerOffset = $("#header").offset();
			var top = (headerOffset.top + 58) + "px";
			
			loader
				.attr("src", "/Portals/abc/Skins/ABC/img/ajaxloader_"+type+".gif")
				.css("position", "absolute")
				.css("left", "50%")
				.css("margin-left", "-36px")
				.css("top", top)
				.css("z-index", "9999");
		});
	});
	
	$(function() {
		if ($(".scrollable").length > 0) {
			var horizontal = $(".scrollable").scrollable({ circular: true, vertical: true }).autoscroll({ autoplay: true, interval: 8000 }).navigator(".navi");
			// when page loads setup keyboard focus on the first horzontal scrollable
			horizontal.eq(0).data("scrollable").focus();
		}
	});

	$(window).bind("load", function() { });
	
})(jQuery);

//GOOGLE ANALYTICS

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-12423978-22']);
_gaq.push(['_setDomainName', 'none']);
_gaq.push(['_setAllowLinker', true]);
_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);
})();

//--GOOGLE ANALYTICS
