// fancybox
$(document).ready(function() {
	/* Apply fancybox to multiple items */
	
	$("div.ngg-gallery-thumbnail a").fancybox({
		'transitionIn'	:	'fade',
		'transitionOut'	:	'fade',
		'speedIn'		:	600, 
		'speedOut'		:	200, 
		'overlayShow'	:	true,
		'titlePosition'  : 'inside',
		'titleShow'     : true
	});
	$("div.conDetails p  a[@href^='http://www.noconoco.lh/wp/wp-content/uploads/'] img").parent().fancybox({
		'transitionIn'	:	'fade',
		'transitionOut'	:	'fade',
		'speedIn'		:	600, 
		'speedOut'		:	200, 
		'overlayShow'	:	true,
		'titlePosition'  : 'inside',
		'titleShow'     : true
	});
	$("div.conDetails  a[@href^='http://www.noconoco.lh/wp/wp-content/uploads/'] img").parent().fancybox({
		'transitionIn'	:	'fade',
		'transitionOut'	:	'fade',
		'speedIn'		:	600, 
		'speedOut'		:	200, 
		'overlayShow'	:	true,
		'titlePosition'  : 'inside',
		'titleShow'     : true
	});
	
});

// スムーズスクロール 
$(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 || $('[name=' + this.hash.slice(1) +']');
			if ($target.length) {
				var targetOffset = $target.offset().top;
				$('html,body').animate({scrollTop: targetOffset}, {easing: "swing", duration:1100});
				return false;
			}
		}
	});
});
