// JavaScript Document
$(function() {
					 
	$("#testimonials").smoothDivScroll({autoScroll:'always', autoScrollDirection:'endlessloopright', autoScrollStep:1, autoScrollInterval:20});

	$(".selecttext").click(function() {
			$(this).css("color", "#000");
			this.select();
	});
	$("#searchbg").blur(function() {
		$(this).css('color','#999');
	});

	if (segment1 != '') $('#topnav li a[href$="'+segment1+'"]').addClass('active');
	else $('#topnav li:eq(0) a').addClass('active');
	
	if (segment2 == '') {
		$('#sidenav li:eq(0) a').addClass('active');
	} else if (segment3 != '') {
		$('#sidenav li a[href$="'+segment3+'"]').addClass('active');
	} else {
		$('#sidenav li a[href$="'+segment2+'"]').addClass('active');
	}
	
	// columnize the primary nav
	$('#topnav .col-3 > ul').makeacolumnlists({cols:3,colWidth:180,equalHeight:false,startN:1});
	$('#topnav .col-2 > ul').makeacolumnlists({cols:2,colWidth:120,equalHeight:false,startN:1});
	
});

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-543054-5']);
_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);
})();
