function autoSlider2() {
	$active = $('.slider2-box.active');
	if ($active.length == 0) {
		$active = $('.slider2-box:first');
	}
	
	$next = $active.next('.slider2-box');
	if ($next.length == 0) {
		$next = $('.slider2-box:first');
	}

	activateSliderBox2($next);
}

function activateSliderBox2($box) {
	if ($('.slider2-box.active').attr('data') == $box.attr('data'))
		return;
	
	$('.slider2-images img').css('opacity', 1);
	$('.slider2-images img:visible').stop().show().fadeOut();	
	$('.slider2-images img[data="' + $box.attr('data') + '"]').stop().hide().fadeIn();
	
	$('.slider2-box.active').removeClass('active');
	$box.addClass('active');
}

var sliderInterval2 = null;
function runSlider2() {
	stopSlider2();
	sliderInterval2 = setInterval('autoSlider2()', 3000);
}
function stopSlider2() {
	clearInterval(sliderInterval2);
}
$(function(){
	$imageBox = $('<div />')
		.addClass('slider2-images')
		.addClass('corners')
		.prependTo('.content-wrapper2')
	;
	$('<div class="lt" />').appendTo($imageBox);
	$('<div class="rt" />').appendTo($imageBox);
	$('<div class="lb" />').appendTo($imageBox);
	$('<div class="rb" />').appendTo($imageBox);
	var id = 1;
	$('.slider2-box').each(function(){
		$(this)
			.attr('data', id)
			.mouseover(function(){
				stopSlider2();
				activateSliderBox2($(this));
			})
		;
		$image = $(this).find('img:first');
		$image.attr('data', id);
		$image.appendTo($imageBox);
		if (id != 1)
			$image.hide();
		else
			$(this).addClass('active');
		id++;
	});
	$('.sliders2').mouseout(runSlider2);
	runSlider2();

$('.navigation .left, .navigation .right').height(($('.navigation .left').height() > $('.navigation .right').height()) ? $('.navigation .left').height() : $('.navigation .right').height() );
	
});



