$(document).ready(function()
{
	$('a[href*=#]').click(function() {
	if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
		//alert(this.hash);
			var $target = $(this.hash);
			$target = $target.length && $target || $('[name=' + this.hash.slice(1) +']');
			if ($target.length) {
				var targetOffset = $target.offset().top;
				$('html,body').animate({scrollTop: targetOffset - 100}, 500);
				return false;
			}
		}
	});

	
	/*
	Rotating CS Photos
	*/
	var currCs = 2;
	
	
	function rotateCS() {
		/*
		//alert("custserv" + currCs);
		$("#custservicon em img").animate({"opacity": "hide"});
		//$("#custservicon img").removeClass("hideCS");
		$("#custservicon em img#custserv" + currCs).animate({"opacity": "show"});
		currCs++;
		if(currCs == 5) {
			currCs = 1;
		}
		*/
		//setTimeout(rotateCS, 5000);
	}
	/*
	$("#custservicon em img").addClass("hideCS");
	//$("#custservicon img#custserv1").removeClass("hideCS");
	$("#custservicon em img#custserv1").animate({"opacity": "show"});
	setTimeout(rotateCS, 5000);
	*/
	
});