// Open blank window
window.onload = function() {
	var node_a = document.getElementsByTagName('a');
	for (var i in node_a) {
		if (node_a[i].className == 'blank') {
			node_a[i].onclick = function() {
			window.open(this.href, '', '');
			return false;
			};
		};
	};
};

// PAGE TOP
$(document).ready(function() {
	$('a[href*=#]').click(function() {
		if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
			var target = $(this.hash);
			target = target.length && target;
			if (target.length) {
				var sclpos = 30;
				var scldurat = 1000;
				var targetOffset = target.offset().top - sclpos;
				$('html,body')
					.animate({scrollTop: targetOffset}, {duration: scldurat, easing: "easeOutExpo"});
				return false;
			}
		}
	});
});
