$(document).ready(function(){
	$(document).pngFix({ blankgif:'clear.gif' });
	$("a").attr({ onfocus: "this.blur();" });
	
	$('#splash').cycle({
		timeout:8000,
		speed:500,
		pause:true
	});

	$('#pic').cycle({
		timeout:5000,
		speed:500,
		pause:true
	});

	$(".topnav_elem_act").animate({ 
		marginTop: "20px"
	}, 1400 );

	if (!$.browser.msie || ($.browser.msie && parseInt(jQuery.browser.version) >= 7)) {
		if ($(".topnav_elem_act").html() == null) {
			$(".topnav_elem").animate({ 
				marginTop: "20px"
			}, 1400 );
		}
	
		$(".topnav_elem").hover(
			function () {
				if (!$(this).hasClass(".topnav_elem_act")) {
					$(this).animate({ 
						marginTop: "20px"
					}, 200 );
				}
			}, 
			function () {
				if (!$(this).hasClass(".topnav_elem_act")) {
					$(this).animate({ 
						marginTop: "0px"
					}, 600 );
				}
			}
		);
	} else {
/*		$(".topnav_elem").click(function(){
			alert('hall');
		});
		$(".topnav_elem").css('border','1px solid red');*/
	}
	
	if ($('#content').height() > '363') {
		$('#content').css('overflow-y','hidden');
	} else if ($('#content').height() > '166') {
		$('#content').css('height','363px');
	} else if ($('#content').height() <= '166') {
		$('#content').css('height','166px');
	}

	if ($('.news-single-content').height() > '166') {
		$('.news-single-content').css('min-height','363px');
		$('.news-single-item').css('height','393px');
	} else if ($('.news-single-content').height() <= '166') {
		$('.news-single-content').css('height','166px');
	}

	/*if ($('.news-list-container').height() > '166') {
		$('.news-list-container').css('height','363px');
	} else if ($('.news-list-container').height() <= '166') {
		$('.news-list-container').css('height','166px');
	}*/

});
