$(document).ready(function(){
	//$("a[href^=#]").click(function(){
	
	//var lh = $(location.hash);
	//alert(lh);
	//if(lh != null){
	var isl_parms = new Array();
	//alert($(location).attr('href'));
	isl_parms = $(location).attr('href').split('#');
	if(isl_parms[1] != null){
		//alert(isl_parms[1]);
		$('html,body').animate({ scrollTop: $("#"+isl_parms[1]).offset().top-130 }, 10);
	}
	
	$("a").click(function(){
		//alert("aa");
		
		var href= $(this).attr("href");
		
		if(href.match(/^#/)) {
			if (typeof document.documentElement.style.maxHeight != "undefined") {
				$('html,body').animate({ scrollTop: $($(this).attr("href")).offset().top-150 }, 'slow','swing');
				return false;
				if(location.hash){
					$('html,body').animate({ scrollTop: $(location.hash).offset().top-150 }, 'slow','swing');
				}
			}else{ //IE6
				$('html,body').animate({ scrollTop: $($(this).attr("href")).position().top-150 }, 'slow','swing');
				return false;
				if(location.hash){
					$('html,body').animate({ scrollTop: $(location.hash).position().top-150 }, 'slow','swing');
				}
			}
		}
		
	});
});
