$(function(){
		$('a._hover').hover(
			function(){
				$(this).fadeTo(100, 0.7);
			},
			function(){
				$(this).fadeTo(500, 1.0);
			}
		);
		
		$('a._hover2').hover(
			function(){
				$(this).children("img").fadeTo(100, 0.7);
			},
			function(){
				$(this).children("img").fadeTo(500, 1.0);
			}
			);
		$('ul.item_list li').hover(
			function(){
				$(this).addClass("hover");
				var cs_thumbs = $(this).children("div.cs_thumbs");
				var cs_thumbs_height = $(this).height();

				$(this).children("div.cs_thumbs").show();
				$(this).children("div.cs_thumbs").height(cs_thumbs_height + 6);
				$(this).css("z-index","2");
				$(this).next().css("z-index","1");
			},
			function(){
				$(this).removeClass("hover");
					$(this).children("div.cs_thumbs").hide();
			}
		);
		
		var mainSrc =	$('#mainPhoto').attr("src");
		$('div.photo_thumbs_block a').hover(
			function(){
				var thisSrc =	$(this).attr("name");
				$('#mainPhoto').attr("src",thisSrc);
			},
			function(){
				var thisSrc =	$(this).attr("name");
				$('#mainPhoto').attr("src",mainSrc);
			}
		);
		
		$('div.item_color_variation_block div a').hover(
			function(){
				var thisSrc =	$(this).attr("name");
				$('#mainPhoto').attr("src",thisSrc);
			},
			function(){
				var thisSrc =	$(this).attr("name");
				$('#mainPhoto').attr("src",mainSrc);
			}
		);
		
		// $('a._zoom1').lightBox();
		// $('a._zoom2').lightBox();
		
		
	$('ul.categoryListNavi li.categoryListNaviPrev a').hover(
		function () {
			$(this).attr('title', $(this).find('img').attr('src') );
			$(this).find('img').attr('src', $(this).attr('name'));
		},
		function () {
			$(this).find('img').attr('src', $(this).attr('title'));
		}
	);
	$('ul.categoryListNavi li.categoryListNaviNext a').hover(
		function () {
			$(this).attr('title', $(this).find('img').attr('src') );
			$(this).find('img').attr('src', $(this).attr('name'));
		},
		function () {
			$(this).find('img').attr('src', $(this).attr('title'));
		}
	);
	
	var cib_max_height = 0;
	$('.collectionIndexMajorityRow div.collectionIndexBlock').each(
		function () {
			if ( cib_max_height == 0 || cib_max_height < $(this).height() ) {
				cib_max_height = $(this).height();
			}
		}
	);
	$('.collectionIndexMajorityRow div.collectionIndexBlock').each(
		function () {
			if ( $(this).height() < cib_max_height ) {
				//var diff = cib_max_height - $(this).height();
				$(this).height(cib_max_height);
				$(this).find('.collectionIndexBlockMore').css('position', 'absolute').css('bottom', '8px').css('right', '15px');
			}
		}
	);
	$('.collectionIndexMajorityRow div.collectionIndexBlock a.collectionIndexBlockAnchor').each(
		function () {
			$(this).height(cib_max_height + 20);
		}
	);
	
	var cib_min_max_height = 0;
	$('.collectionIndexMinorityRow div.collectionIndexBlock').each(
		function () {
			if ( cib_min_max_height == 0 || cib_min_max_height < $(this).height() ) {
				cib_min_max_height = $(this).height();
			}
		}
	);
	$('.collectionIndexMinorityRow div.collectionIndexBlock a.collectionIndexBlockAnchor').each(
		function () {
			$(this).height(cib_min_max_height + 20);
		}
	);
});


