/* ------------------------------
loading image （未使用） */

$(function () {
     $('.imgBox img').hide();//ページ上の画像を隠す
});
 
var i = 0;
var int=0;
$(window).bind("load", function() {//ページコンテンツのロードが完了後、機能させる
     var int = setInterval("doThis(i)",500);//フェードするスピード
});
 
function doThis() {
     var images = $('img').length;//画像の数を数える
     if (i >= images) {// ループ
          clearInterval(int);//最後の画像までいくとループ終了
    }
    $('img:hidden').eq(0).fadeIn(500);//一つずつ表示する
    i++;
}


/* ------------------------------
ページTOP移動 */

$(function(){
     $("#pagetop a").click(function(){
     $('html,body').animate({ scrollTop: $($(this).attr("href")).offset().top }, 'slow','swing');
     return false;
     })
});




/* ------------------------------
fancybox 対象を指定 */

		$(document).ready(function() {


/* 未使用 ギャラリーにしない場合
			$("a#example7").fancybox({

				'titlePosition'	: 'inside'

			});
*/

/* ギャラリー用 */
			$("a[rel=img_gallery], a[rel=img_gallery_web], a[rel=img_gallery_print], a[rel=img_gallery_illust]").fancybox({

				'transitionIn'		: 'none',

				'transitionOut'		: 'none',

				'titlePosition' 	: 'inside',

				'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {

					return '<span id="fancybox-title-over">' + (title.length ? ' &nbsp; ' + title : '') + '<br />' + 'Image ' + (currentIndex + 1) + ' / ' + currentArray.length + '</span>';

				}

			});



		});


/* ------------------------------
preloader image 対象を指定 */

$(function(){
	
	$("#works_pickup, #works_web, #works_print, #works_illust").preloader();
	
	});


/* ------------------------------
flatHeights 対象を指定 */

/*
$(function() {
    $('#works_pickup > li, #works_web > li, #works_print > li, #works_illust > li').flatHeights();
});
*/



