/* WINDOW OPEN */

function windopen(p, n, w, h) {
	window.open(
		p,
		n,
		'width=' + w + ', height=' + h + ', toolbar=0, menuber=0, scrollbars=1, status=0, resizable=0, top=0, left=0'
	);
}

// viewer
$(function() {
	$('.viewer a').click(function() {
	
		var t = String(this);
		
		window.open(
			t,
			'viewer',
			'width=850, height=620, toolbar=0, menuber=0, scrollbars=0, status=1, resizable=1, top=0, left=0'
		);
		
		return false;
	});
});

//scroll to top
$(function() {
	$('.pgtop 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 scldurat = 800;
				var targetOffset = target.offset().top;
				$('html,body')
					.animate(
						{scrollTop: targetOffset}, 
						{duration: scldurat, 
						easing: "easeOutExpo"
						}
					);
				return false;
			}
		//}
	});
});

// nenga
$(function() {
	$('.nenga a').click(function() {
	
		var t = String(this);
		
		window.open(
			t,
			'nenga',
			'width=650, height=620, toolbar=0, menuber=0, scrollbars=0, status=1, resizable=1, top=0, left=0'
		);
		
		return false;
	});
});


