/*-----------------------------------------------------------
index:
	Horizon Scroll View
	Set Height
	Window Onload
-----------------------------------------------------------*/

/* Horizon Scroll View
-----------------------------------------------------------*/
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('7 z(d){2 3=[];2 8=[];2 9=[];2 a=[];2 4=[];2 n=0;2 b=0;A(1){6($("#c"+5(n)).f()==g){6(n==0){n=1;6($("#c"+5(n)).f()==g)h}B{h}}a[n]=$("#c"+5(n));4[n]=$("#C"+5(n));a[n].j("k","l");4[n].j("k","l");3[n]=0;8[n]=4[n].m()-a[n].m();9[n]=d[b];6(8[n]>0){$("#o"+5(n)).p(7(e){2 i=e.q.r.s("o")[1];6(3[i]>-8[i]){3[i]-=9[i];4[i].t();4[i].u({v:3[i]},w,"x")}});$("#y"+5(n)).p(7(e){2 i=e.q.r.s("y")[1];6(3[i]<0){3[i]+=9[i];4[i].t();4[i].u({v:3[i]},w,"x")}})}n++;b++}}7 5(n){D(n==0)?"":n}',40,40,'||var|sv_tx|sv_element|sv_zero|if|function|sv_max|sv_range|sv_view|n2|sv_scrollView|range||html|null|break||css|position|relative|width||sv_nextButton|click|target|id|split|stop|animate|left|600|easeOutQuart|sv_prevButton|sv_initHScrollView|while|else|sv_scrollElement|return'.split('|'),0,{}))


/* Set Height
-----------------------------------------------------------*/
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(9($){$.13.14=9(x){2 a={o:g,15:g,K:16,y:g};6(x){L.17(a,x)};6($("#p").4){2 q=$(\'#p\').M(0)}18{2 q=$(\'19\').1a(\'<N d="1b:1c;1d:-1e;O:0;" 1f="p">&1g;</N>\').1h(\'#p\').M(0)};2 P=9(r,z){7(2 i=0;i<r.4;i++){6(r[i]==z){Q}};r.A(z)};2 b=R;2 3=[];2 e=[];2 f=[];2 h=9(){7(2 i=0;i<3.4;i++){2 s=0;2 S=3[i][0].B?l(3[i][0].B["1i"])+l(3[i][0].B["1j"]):l(C.T.U(3[i][0],t).V("W-O"))+l(C.T.U(3[i][0],t).V("W-1k"));7(2 j=0;j<3[i].4;j++){3[i][j].d.X="1l";s=1m.1n(3[i][j].m-S,s)};7(2 j=0;j<3[i].4;j++){3[i][j].d.X=s+"1o"}}};2 Y=9(){2 n=0;2 c=0;2 u=t;2 D=t;3[n]=[];2 v=g;7(2 i=0;i<b.4;i++){6(a.y){u=$(b[i]).1p(a.y)[0];6(i>0&&u!=D&&!v){3[++n]=[];c=0};D=u};6(a.o){b[i].1q+=" 1r"+l(c%a.o+1);6(!(c%a.o)&&c>0){3[++n]=[];c=0;v=1s}};3[n][c++]=b[i];v=g};7(2 i=0;i<3.4;i++){6(!3[i][0].m){2 8=3[i][0];Z(8.d.E!="F"){8=8.10};e.A(8)};7(2 j=0;j<3[i].4;j++){2 G=3[i][j].1t(\'11\');7(2 k=0;k<G.4;k++){P(f,G[k].12)}}}};6(b.4){Y();2 H=q.m;2 1u=1v(9(){2 I=q.m;6(I!=H){H=I;h()};7(2 i=0;i<e.4;i++){6(e[i].d.E!="F"){h();e=[];7(2 j=0;j<3.4;j++){6(!3[j][0].m){2 8=3[j][0];Z(8.d.E!="F"){8=8.10};e.A(8)}}}}},a.K);h();6(f.4){2 w=[];2 J=0;7(2 i=0;i<f.4;i++){w[i]=C.1w(\'11\');w[i].1x=9(){J++;6(J==f.4){h()}};w[i].12=f[i]}}};6(1y.1z.1A("1B 5.5")&&b.4){1C(9(){1D(b),0})};Q R}})(L);',62,102,'||var|groups|length||if|for|cur_node|function|settings|nodes|count|style|hidden_groups|images_to_load|false|_set_height||||parseInt|offsetHeight|cur_group|items_per_row|js_etalon|etalon|array|max_height|null|cur_parent|group_inc|dummy_images|options|group_by_parent|item|push|currentStyle|document|prev_parent|display|none|imgs|base_size|current_size|loaded_images|delay|jQuery|get|span|top|_add|return|this|vert_padding|defaultView|getComputedStyle|getPropertyValue|padding|height|_init|while|parentNode|img|src|fn|set_height|one_height|1000|extend|else|body|append|position|absolute|left|9999px|id|nbsp|find|paddingTop|paddingBottom|bottom|auto|Math|max|px|parents|className|nb|true|getElementsByTagName|interval|setInterval|createElement|onload|navigator|userAgent|match|MSIE|setTimeout|main'.split('|'),0,{}))

/* Window Onload
-----------------------------------------------------------*/
$(function(){
//商品詳細マイリスト
	$("#goodsDetail #mylist").each(function() {
		sv_initHScrollView([180]);
	});

//カートマイリスト
	$("#shoppingCart #mylist").each(function() {
		sv_initHScrollView([184]);
	});

//マイリストボタン
	$("#mylist").each(function() {
		var ml_set;
		var ml_sH = 0;
		ml_set = $("#mylist .itemGroupThumbs").get(0);
		ml_sH = parseInt(ml_set.offsetHeight);
		$("#mylist #sv_prevButton").height(ml_sH);
		$("#mylist #sv_nextButton").height(ml_sH);
		$("#mylist #sv_prevButton table").height(ml_sH);
		$("#mylist #sv_nextButton table").height(ml_sH);
	});

//テーブル
	$('table.zebra1').find('tr:even').addClass('even');

//商品一覧サムネイル
	$('.itemGroupThumbs dl:last-child').addClass('last');
	$('.setHeight dl').set_height({ group_by_parent:'div' });
	
	selectSideMenuForLoad();
	
});

/* Navigation Over
-----------------------------------------------------------*/

function selectSideMenuForLoad(){

	var pageID;
	//mainContents2ndは会員系画面で使われている
	jQuery("#colWrap").each(function(){
		pageID = jQuery(this).attr("class");
	});

	/* 会員 */
	var menuID = "#ln_" + pageID;
	var regRep = ".gif";
	var regChange = "_l.gif";

	//対象外の画面の場合、置き換えをせずに終了
	if($(menuID+" img").attr("src") != undefined){
		//画像ファイル名の置き換え
		var imgSrc = $(menuID+" img").attr("src").replace(regRep,regChange);
		$(menuID+" img").attr("src",imgSrc);
		//ロールオーバーを無効にする
		$(menuID+" img").attr("class","");
	}

	/* ガイド */
	var menuID2 = "#go-" + pageID;
	//対象外の画面の場合、置き換えをせずに終了
	if($(menuID2+" img").attr("src") != undefined){
		//画像ファイル名の置き換え
		var imgSrc = $(menuID2+" img").attr("src").replace(regRep,regChange);
		$(menuID2+" img").attr("src",imgSrc);
		//ロールオーバーを無効にする
		$(menuID2+" img").attr("class","");
	}

};

/* main visual
-----------------------------------------------------------*/
function slideShow( element, interval, speed ) {
	
	if ( $(element).length < 2 ) return;
	if ( !$(element+".current").length ) $(element+":first").addClass("current");
	
	$( element + ":not(.current)" ).css("opacity", 0 );
	
	setInterval( function(){
	
		var $current = $(element+".current");
		var $next = $current.next().length ? $current.next() : $(element+":first");
		
		$current.css("z-index",0);
		$next.css("z-index",1);
		$current.removeClass("current").animate( {opacity: 0}, speed );
		$next.addClass("current").animate( {opacity: 1.0}, speed );
	
	}, interval );
	
}
