/* JavaScript Document [j_scroll.js]
	Author: Claudio Nunez Jr.
	Entity: Rayhawk Corporation
	Copyright: 2010
	Requirements: jQuery [core: current release].
	Original Creation Date: 07.09.2010
	Last Update On: 03.10.2011
	Description:  Dynamically scrolls to any anchor's corresponding named anchor within the same web page upon being clicked on. */

$(document).ready(function() {
						   
	$("a[href^='#']").click(function() {
		
		var thisHrefAttr = $(this).attr("href");
		var anchorNameAttr = thisHrefAttr.replace(/#/, "");
		var scrollTopValue = $("a[name='" + anchorNameAttr + "']").offset().top;
		
		$(window.opera?"html":"html, body").animate({scrollTop: scrollTopValue}, "slow");
		
		return false;
	});
});
