$(document).ready(function(){
	//initSlider();
	$(".right_side_pic").mouseenter(function(event) {
		event.stopPropagation();
		$("#big_fade").fadeIn("slow");
		$(".blue_stripe").fadeOut("slow");
	}).mouseleave(function(event) {
		event.stopPropagation();
		$("#big_fade").fadeOut("slow");
		$(".blue_stripe").fadeIn("slow");
	});
	
	$(".right_little_pic").mouseenter(function(event) {
		event.stopPropagation();
		$("#little_fade").fadeIn("slow");
	}).mouseleave(function(event) {
		event.stopPropagation();
		$("#little_fade").fadeOut("slow");
	});
});
	function initSlider(pic_index) {
		var items = $(".item");
		var pictures = $(".pic");
		if (!pic_index) {
			var active = pictures.size() - 1;
			var main = pictures.size() - 1;
		} else {
			var active = pic_index;
			var main = pic_index;
		}
		
		pictures.css("display", "none");
		pictures.css("opacity", "0");
		pictures.eq(active).css("display", "block");
		pictures.eq(active).css("opacity", "1");
		
		$(".item a").css("z-index", pictures.size()+2);
		
		items.each(function() {
			$(this).mouseenter(function() {
				active = $(this).index();
				//$(this).find(':first-child').css("z-index", "0");
				showPicture();
				$(this).find(':first-child').addClass("active");
				items.eq(active).find('.arrow').css("display", "block");
			}).mouseleave(function() {
				$(this).find(':first-child').removeClass("active");
				items.eq(active).find('.arrow').css("display", "none");
				//active = main;
				//showPicture();
			});
		});
		
		$(".main_pic").mouseenter(function() {
			items.eq(active).find(':first-child').addClass("active");
			items.eq(active).find('.arrow').css("display", "block");
		}).mouseleave(function() {
			items.find(':first-child').removeClass("active");
			items.eq(active).find('.arrow').css("display", "none");
			//$(".item a").css("z-index", pictures.size()+2);
			active = main;
			showPicture();
		});
		
		function showPicture() {
			return false;
			pictures.each(function(index) {
				if (index == active) {
					$(this).stop();
					$(this).css("z-index", pictures.size()+1);
					$(this).css("display", "block");
					$(this).animate({
						opacity: 1
					}, 500);
				} else {
					$(this).css("z-index", index);
					$(this).stop();
					$(this).animate({
						opacity: 0
					}, 200, function() {
						$(this).css("display", "none");
					});
				}
			});
		}
	}
