// +++photo*WAVE++++++++++++++++++++++++++++++++++++++++++++++
//
// jQuery pwSlider ver2.0
// Since:2008/03/07/
//
// Copyright (c) 2007-2008  http://www.photowave.co.jp/
//
// EditiorID:MGN
// EditiorID:
//
// use library:jquery.js
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


/* Category:layer  +++++++++++++++++++++++++++++++++++++++++ */


//On Load Action *********************************************************************


/*イベントページ用：フラグ処理*/
function getHikisuu(){
	getHikisuu.data = new Array();
	getHikisuu.string = location.search.substring(1);
	getHikisuu.string = getHikisuu.string.split('&');
	for(var i = 0; i != getHikisuu.string.length; i++){
		getHikisuu.data[ck_shikibetushi(getHikisuu.string[i].split('=')[0])] 
		= Escape(unescape(getHikisuu.string[i].split('=')[1]));
	}
	function ck_shikibetushi(shiki){
		shiki_TOP = shiki.substring(0,1);
		if(shiki_TOP.match(/[a-zA-Z_$]/g) == null){
		return null;
		}
		else if(shiki.match(/[^a-zA-Z0-9_$]/g) != null){
			return null;
		} 
		return shiki;
		}
	function Escape(str){
		str = str.replace( /¥&/g, '&amp;' );
		str = str.replace( /</g, '&lt;' ); 
		str = str.replace( />/g, '&gt;' ); 
		str = str.replace( /¥"/g, '&quot;' );
		str = str.replace( /¥'/g, '&#39;' );
		return str;
		}
  //
	if(getHikisuu.data.flg == "1"){ //TOP
		document.write("<body onload='pwSlider()'>");
	}


	//それ以外の時
	else if(getHikisuu.data.flg != "0"){

		document.write("<body>");
	}
}
new getHikisuu();


		//others
		jQuery(document).ready(function(){
	
		//01 PNG：この記述追加で無条件でPNGが使用できる
    jQuery(document).pngFix(); 
	
		//02 HTML-PreLoad
    jQuery("#load_tmp").load("http://www.photowave.co.jp/works/template.html");
		jQuery("#load_HTML").load("http://www.photowave.co.jp/works/include/include.html");
		});


//On Click Action *********************************************************************

		//01スライドボタンの読み込み
		function pwSliderOpn()
		{
		document.write('<div id="slideOpn"><a onclick="pwSlider()"><img src="http://www.photowave.co.jp/image/works/btn_open.png" alt="WORKS" /></a></div><div id="load_tmp"></div>')
 
		//02 ベースのHTMLの読み込み
		jQuery("#load_tmp").load("http://www.photowave.co.jp/works/template.html");
		}

		//03 スライドを開く
		function pwSlider()
		{
		jQuery("#load_HTML").load("http://www.photowave.co.jp/works/include/include.html");
    jQuery(document.body).pngFix();
		jQuery("#slideOpn").fadeOut()//ボタン後に消える

		jQuery("#slideLayer").animate({width: 'show'}, 300);//開いた後の動作
		jQuery("#slideMn").animate({ opacity: 'show', width: 'show' }, 2000);//グローバルメニューの表示

			jQuery("#slideMn").click(function(){//グローバルメニュークリック後の動作
					jQuery("#slideMn").animate({ height: '64px' }, "slow");//グローバルメニューの移動
					jQuery("#photoBox").animate({ width: 'show', height: 'show' }, "slow");//表示するレイヤーの内容表示
    			jQuery(document.body).pngFix();//IEのPNG対策
					jQuery("#thumBox").fadeIn(2000);//サムネイルのフェード効果
					jQuery("#imgView,#load_img").fadeIn(2000);//拡大イメージのフェード効果
			});

}


//スライドのクローズ
function pwSliderCls(){
		jQuery("#slideMn").animate({ opacity: 'hide', width: 'hide', height:'400px'}, 100);//グローバルメニューの初期化
		jQuery("#thumBox").fadeOut(500);//サムネイル要素の初期化
		jQuery("#thumbnail li").fadeOut(600);//サムネイル要素の初期化
		jQuery("#imgView").fadeOut(900);//拡大イメージの初期化
		jQuery("#load_img").fadeOut(900);//拡大イメージの初期化
		jQuery("#slideLayer").animate({ width: 'hide' },500);//スライドの初期化
		jQuery("#slideOpn").fadeIn(3000)//アニメーション後にボタン表示
		jQuery("#toppage #slideOpn").hide()//TOPのみアニメーション後にボタン非表示
}

//On Mouse Action *********************************************************************

		//スライドオープン後のメニュー処理
		//01:corporate
		function mnCorp(){
					jQuery('#thumbnail li').fadeOut('fast'),
					jQuery('#load_img').fadeOut('fast').html('<div id=img_load><img src="http://www.photowave.co.jp/image/works/category_corporate.png" alt="corporate" /></div>').fadeIn('3000'),jQuery('#thumbnail .corp').fadeIn('slow'),
					jQuery('#load_img').addClass('corp')
		}
		//02:e-commerce
		function mnEc(){
					jQuery('#thumbnail li').fadeOut('fast'),
					jQuery('#load_img').fadeOut('fast').html('<div id=img_load><img src="http://www.photowave.co.jp/image/works/category_e-commerce.png" alt="e-commerce" /></div>').fadeIn('3000'),
					jQuery('#thumbnail .ec').fadeIn('slow'),jQuery('#load_img').addClass('ec')
		}
		//03:project
		function mnPro(){
					jQuery('#thumbnail li').fadeOut('fast'),
					jQuery('#load_img').fadeOut('fast').html('<div id=img_load><img src="http://www.photowave.co.jp/image/works/category_project.png" alt="project" /></div>').fadeIn('3000'),
					jQuery('#thumbnail .pro').fadeIn('slow'),jQuery('#load_img').addClass('pro')
		}
		//04:service
		function mnSvc(){
					jQuery('#thumbnail li').fadeOut('fast'),
					jQuery('#load_img').fadeOut('fast').html('<div id=img_load><img src="http://www.photowave.co.jp/image/works/category_service.png" alt="project" /></div>').fadeIn('3000'),
					jQuery('#thumbnail .svc').fadeIn('slow'),jQuery('#load_img').addClass('svc')
		}
		//05:all category
		function mnAll(){
					jQuery('#thumbnail li').fadeOut('fast'),
					jQuery('#load_img').fadeOut('fast').html('<div id=img_load><img src="http://www.photowave.co.jp/image/works/category_all.png" alt="all category" /></div>').fadeIn('3000'),
					jQuery('#thumbnail .corp,#thumbnail .ec,#thumbnail .pro,#thumbnail .svc').fadeIn('slow'),jQuery('#load_img').removeClass().addClass('all')
		}


