$(function() {
    $('#nav').droppy({speed: 100});
});

// Easingの追加
jQuery.easing.quart = function (x, t, b, c, d) {
	return -c * ((t=t/d-1)*t*t*t - 1) + b;
};

/*-------------------------------------
 ページ読み込み中
-------------------------------------*/
jQuery(document).ready(function(){

	//
	// <a href="#***">の場合、スクロール処理を追加
	//
	jQuery('a[href*=#]').click(function() {
		if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
			var $target = jQuery(this.hash);
			$target = $target.length && $target || jQuery('[name=' + this.hash.slice(1) +']');
			if ($target.length) {
				var targetOffset = $target.offset().top;
				jQuery('html,body').animate({ scrollTop: targetOffset }, 1200, 'quart');
				return false;
			}
		}
	});

	//画像切り替え、#targetの内容を変更する。
	$("ul#additionalImg > li > a").click(function(){
		var src = $(this).attr("href");
		$("#target").fadeOut("fast",function() {
			$(this).attr("src",src);
			$(this).fadeIn();
		});
		return false;
	});
});



function PopupWindow(pUrl) {
　var mWinName = 'myPop';
　var mOption = 'width=720, height=700, location=no, menubar=no, toolbar=no, scrollbars=yes, resizable=yes';
  var winFocus;
　winFocus = window.open(pUrl, mWinName, mOption);
    winFocus.focus();
}


/*
$('#portfolio').crossSlide({
  fade: 1
}, [
  {
    src:  'lib/sand-castle.jpeg',
    href: 'http://flickr.com/photos/spacetrucker/94209642/',
    from: '100% 80% 1x',
    to:   '100% 0% 1.7x',
    time: 3
  }, {
    src:  'lib/sunflower.jpeg',
    href: 'http://flickr.com/photos/hichako/1125341449/',
    from: 'top left',
    to:   'bottom right 1.5x',
    time: 2
  }, {
    src:  'lib/flip-flops.jpeg',
    href: 'http://flickr.com/photos/jayniebell/1125216143/',
    from: '100% 80% 1.5x',
    to:   '80% 0% 1.1x',
    time: 2
  }, {
    src:  'lib/rubber-ring.jpeg',
    href: 'http://flickr.com/photos/ruminatrix/1125292682/',
    from: '100% 50%',
    to:   '30% 50% 1.5x',
    time: 2
  }
]);
*/    

