$(function(){

/* внешние ссылки */
$('a[href^=http://]').not('.lang-switch a').click(function(){
    window.open($(this).attr('href'));
    return false;
});

var $alt  = $('#altContent')
var $imgs = $('img', $alt);

if ($imgs.length) {
	$imgs.eq(0).addClass('cur');
	setInterval(function(){
		$cur = $('.cur', $alt);
		$next = $cur.next('img');
		if ($next.length) {
			$cur.animate({
				opacity: 0
			}, 500, function(){
				$cur.removeClass('cur');
				$next.addClass('cur');
			});
		} else {
			$cur.removeClass('cur');
			$cur = $imgs.eq(0).addClass('cur');
		        $cur.animate({
				opacity: 1
			}, 500, function(){
				$imgs.css({opacity: 1});
			});
		}
	}, 4000);
}

});