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

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

});







j$(function() {
if (navigator.appVersion.indexOf("Safari")) {
		j$('a[href*=#]').click(function() {
			if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')
			&& location.hostname == this.hostname) {
				var $target = j$(this.hash);
				$target = $target.length && $target
				|| j$('[name=' + this.hash.slice(1) +']');
				if ($target.length) {
					var targetOffset = $target.offset().top;
					j$('body').animate({scrollTop: targetOffset}, 1000);
					
					return false;
				}
			}
		});
}
});





j$(function () {

		if(navigator.userAgent.indexOf("MSIE") != -1){
			j$('a[href*=#]').click(function () {
							j$('html,body').animate({ targetOffset: 0 }, 300, 'quart');
				});
		}

		else{
			j$('a[href*=#]').click(function () {
							j$('html').animate({ targetOffset: 0 }, 300, 'quart');
			});
		}

});


