// JavaScript Document
/////////font //////////////////////////

jQuery(document).ready(function () {
	Cufon.replace('.Copper', { fontFamily: 'Copper', hover: true  });
	
});
///////////////////////////////////////////////////

jQuery("document").ready(function(){
	if (jQuery(".Description").length > 0) {
		jQuery(".Description").each(function() {
			jQuery(this).css("margin-top",-jQuery(this).outerHeight()/2-27);
		});
		jQuery(".BigImg > li").hide();
		jQuery(".BigImg > li.Active").show();
	}
	
	
	var changeActive = setInterval("changeActiveState()",3000);
	jQuery(".ImgSlider > .Thumbnail > li").bind("mouseover",function(evt) {
		clearInterval(changeActive);
		var index1;
		jQuery(".ImgSlider > .Thumbnail > li").each(function(index) {
			if (jQuery(this).hasClass("Active")) {
				jQuery(this).removeClass("Active");
				index1=index;
			}
		});
		jQuery(this).addClass("Active");
		jQuery(".ImgSlider > .Thumbnail > li").each(function(index) {
			if (jQuery(this).hasClass("Active")) {
				if (index1 !=index) {
					jQuery(".ImgSlider > .BigImg > li").eq(index1).fadeOut("normal");
					jQuery(".ImgSlider > .BigImg > li").eq(index).fadeIn("normal");
				}
			}
		});
	});
	jQuery(".ImgSlider > .Thumbnail > li").bind("mouseout",function(evt) {
		changeActive = setInterval("changeActiveState()", 3000);
	});
	jQuery(".ImgSlider > .BigImg > li").bind("mouseover",function(evt) {
		clearInterval(changeActive);
	});
	jQuery(".ImgSlider > .BigImg > li").bind("mouseout",function(evt) {
		changeActive = setInterval("changeActiveState()",3000);
	});
	
	jQuery(".ListContent > ul > li").bind("mouseover",function(evt) {
		clearInterval(changeActive);
		var index1;
		jQuery(".ListContent > ul > li").each(function(index) {
			if (jQuery(this).hasClass("Active")) {
				jQuery(this).removeClass("Active");
				index1=index;
			}
		});
		jQuery(this).addClass("Active");
		jQuery(".ListContent > ul > li").each(function(index) {
			if (jQuery(this).hasClass("Active")) {
				if (index1 !=index) {
					jQuery(".ListInfo > ul > li").eq(index1).fadeOut("fast");
					jQuery(".ListInfo > ul > li").eq(index).fadeIn("fast");
				}
			}
		});
	});
	jQuery(".ListContent > ul > li").bind("mouseout",function(evt) {
		changeActive = setInterval("changeActiveState()",2000);
	});
});
/*
function changeActiveState() {
	var currentActiveIndex= 0;
	var currentActiveIndex2= 0;
	jQuery(".ListContent > ul > li").each(function(index) {
		if (jQuery(this).hasClass("Active")) {
			jQuery(this).removeClass("Active");
			currentActiveIndex=index;
		}
	});
	if (currentActiveIndex == (jQuery(".ListContent > ul > li").length-1))
		currentActiveIndex2 = 0;
	else
		currentActiveIndex2 = currentActiveIndex + 1;
	jQuery(".ListInfo > ul > li").eq(currentActiveIndex).fadeOut("normal");
	jQuery(".ListInfo > ul > li").eq(currentActiveIndex2).fadeIn("normal");
	jQuery(".ListContent > ul > li").eq(currentActiveIndex2).addClass("Active");
}*/

function changeActiveState() {
	var currentActiveIndex= 0;
	var currentActiveIndex2= 0;
	jQuery(".ImgSlider > .Thumbnail > li").each(function(index) {
		if (jQuery(this).hasClass("Active")) {
			jQuery(this).removeClass("Active");
			currentActiveIndex=index;
		}
	});
	if (currentActiveIndex == (jQuery(".ImgSlider > .Thumbnail > li").length-1))
		currentActiveIndex2 = 0;
	else
		currentActiveIndex2 = currentActiveIndex + 1;
	jQuery(".ImgSlider > .BigImg > li").eq(currentActiveIndex).fadeOut("normal");
	jQuery(".ImgSlider > .BigImg > li").eq(currentActiveIndex2).fadeIn("normal");
	jQuery(".ImgSlider > .Thumbnail > li").eq(currentActiveIndex2).addClass("Active");
}
