$(document).ready(function() {
	_prefix = '^_';
	_prefix_regex = new RegExp(_prefix);
	if (location.hash.replace(new RegExp('#'),'').match(_prefix_regex)) {
		$(".setfocusonscroll:first").focus();
	}
});
	
/*var old_hash = location.hash;

function smoothScroll(_prefix) {

	if (!_prefix) _prefix = '_';
	
	__prefix = _prefix;
	_prefix = '^' + _prefix;
	_prefix_regex = new RegExp(_prefix);
	
	if (old_hash.replace(new RegExp('#'),'').match(_prefix_regex)) {
		
		$(document).ready(function() {
			
			if (old_hash.replace(new RegExp('#'), '')) {
				
			var loc = old_hash.replace(new RegExp('#'),'');
			
	    	var $target = $('a[name*="' + loc  + '"]');
	    	var target = loc;
	   		if (target) {
				var targetOffset = $target.offset().top;
				location.hash = '#top';
	    		$('html, body').animate({scrollTop: targetOffset}, 1500, function() {
	    		location.hash = old_hash;
		        $("input.setfocus:last").focus();
    			$(".setfocusonscroll:first").focus();    
	    		});
	  
	  		 }			
	 	
	 		}	
	 	});
	}

$(document).ready(function() {
  function filterPath(string) {
  return string
 .replace(/^\//,'')
 .replace(/(index|default).[a-zA-Z]{3,4}$/,'')
 .replace(/\/$/,'');
  }
  var locationPath = filterPath(location.pathname);
  $('a[href*=#' + __prefix + ']').each(function() {
  
 var thisPath = filterPath(this.pathname) || locationPath;
 if (  locationPath == thisPath
 && (location.hostname == this.hostname || !this.hostname)
 && this.hash.replace(new RegExp('#'),'') ) {

   var $target = $('a[name*="' + this.hash.replace(new RegExp('#'),'') + '"]'); var target = this.hash;
   if (target) {
   
  var targetOffset = $target.offset().top;
  
  $(this).click(function(event) {
  	
    event.preventDefault();
    $('html, body').animate({scrollTop: targetOffset}, 1500, function() {
    location.hash = target;
    $("input.setfocus:last").focus();
    $(".setfocusonscroll:first").focus();    
    });
  });
   }
 }
  });

 

});






}

setTimeout("smoothScroll()", 0);*/
