//初期値
var arcNailListAry = ['#viewNail2011','#viewNail2010'];
var arcNailAry = ['#tbNail2011','#tbNail2010'];
var arcFootListAry = ['#viewFoot2011','#viewFoot2010'];
var arcFootAry = ['#tbFoot2011','#tbFoot2010'];
var styleAry = ['#styleImageA','#styleImageB','#styleImageC'];
var nailAry = ['#nailVeil','#nailInnocent','#nailBrilliant','#nailCrystal','#nailPrincess','#nailDiamond','#nailBouquet','#nailTiara','#nailPearl'];
//リンクの選別
$(function(){
$(".thumbsSub").css({"display":"none"});

$("#tbNail2010,#tbFoot2010").css({"display":"none"});
$("#viewNail2011,#viewFoot2011").css('opacity',1);
$("#viewNail2010,#viewFoot2010").css('opacity',0.5);

//Nailアーカイブ
	$("#viewNail2011,#viewNail2010").click(function(){
		for (i=0; i<arcNailAry.length; i++){
			if(i == $("ul#nailArcNavi li").index(this)){
			$(arcNailAry[i]).fadeIn('slow');
			$(arcNailListAry[i]).css('opacity',1);
			}else{
			$(arcNailAry[i]).css({"display":"none"});
			$(arcNailListAry[i]).css('opacity',0.5);
			}
		}
	});

//Footアーカイブ
	$("#viewFoot2011,#viewFoot2010").click(function(){
		for (i=0; i<arcNailAry.length; i++){
			if(i == $("ul#footArcNavi li").index(this)){
			$(arcFootAry[i]).fadeIn('slow');
			$(arcFootListAry[i]).css('opacity',1);
			}else{
			$(arcFootAry[i]).css({"display":"none"});
			$(arcFootListAry[i]).css('opacity',0.5);
			}
		}
	});

//slimbox2
/* custom options => loop: [Default is false],overlayOpacity: [Default is 0.8],overlayFadeDuration: [Default is 400],resizeDuration: [Default is 400],resizeEasing: [jQuery Easing Plugin required],initialWidth: [Default is 250],initialHeight: [Default is 250],imageFadeDuration: [Default is 400],captionAnimationDuration: [Default is 400],counterText: [Default is "Image {x} of {y}"],closeKeys: [Default is [27, 88, 67]],previousKeys: [Default is [37, 80]],nextKeys: [Default is [39, 78]]
*/
	$("#handArea a[rel^='lightbox']").slimbox({overlayOpacity: 0.6,counterText: "Hand Nail [{x} / {y}]"}, null, function(el) {
		return (this == el) || ((this.rel.length > 8) && (this.rel == el.rel));
	});

	$("#footArea a[rel^='lightbox']").slimbox({overlayOpacity: 0.6,counterText: "Foot Nail [{x} / {y}]"}, null, function(el) {
		return (this == el) || ((this.rel.length > 8) && (this.rel == el.rel));
	});
/*	$("#nudejewelryArea a[rel^='lightbox']").slimbox({overlayOpacity: 0.6,captionAnimationDuration: 200,counterText: "Nude Jewelry [{x} / {y}]"}, null, function(el) {
		return (this == el) || ((this.rel.length > 8) && (this.rel == el.rel));
	});*/
	if($("#wedstyleArea").length){
		for (s=0; s<styleAry.length; s++){
			if(s != 0){$(styleAry[s]).css({"display":"none"});}
		}
		$("#wedstyleSmall li:eq(0)").animate({opacity: 0.3},800);

		for (n=0; n<nailAry.length; n++){
			if(n != 0){$(nailAry[n]).css({"display":"none"});}
		}
		$("#wednailThumb li:eq(0)").animate({opacity: 0.3},800);
	}

});

//スタイル画像置き換え
function chStyle(num){
	for (i=0; i<styleAry.length; i++){
		if(i == num){
		$("#wedstyleSmall li:eq("+num+")").animate({opacity: 0.3},800);
		}else{
		$("#wedstyleSmall li:eq("+i+")").animate({opacity: 1},200);
		}
	}
	$("#wedstyleImg").fadeOut("fast",function(){
		for(p=0; p<styleAry.length; p++){
		$(styleAry[num]).css({"display":"block"});
			if(p != num){
			$(styleAry[p]).css({"display":"none"});
			}
		}
	}).fadeIn();
}

//ネイル画像置き換え
function chNail(num){
	for (i=0; i<nailAry.length; i++){
		if(i == num){
		$("#wednailThumb li:eq("+num+")").animate({opacity: 0.3},800);
		}else{
		$("#wednailThumb li:eq("+i+")").animate({opacity: 1},200);
		}
	}
	$("#wednailImg").fadeOut("fast",function(){
		for(p=0; p<nailAry.length; p++){
		$(nailAry[num]).css({"display":"block"});
			if(p != num){
			$(nailAry[p]).css({"display":"none"});
			}
		}
	}).fadeIn();
}

