﻿var zindex = 101;


$(document).ready(function() {

    //topMenu-hover
    $('.HeaderMenu li.level-0').hover(
       function() {
           //           if ($(this).find('ul.level-1').length != 0) {
           //               $('li.level-1:eq(0) a', this).css('padding-right', '11px');
           //               $('li.level-1:last a', this).css('padding-left', '10px');
           //           }
           zindex += 1;
           $(this).find('ul.level-1')
                .css({ 'z-index': zindex })
                .removeClass('hide-this').show(); //fadeIn(100);

       },
	function() {
	    var o = $(this);
	    o.find('ul.level-1').addClass('hide-this');
	    o.find('ul.level-1.hide-this').hide(); //fadeOut(70);
	});


	$(".LogosWrapper li:last").addClass("lastLogo")
	
	//home page new scroller
	$("UL.news").clone().addClass("news2").removeClass("news").appendTo(".newsList").css("top",$("UL.news").height()+"px");
	var newsS=setTimeout("newsScroller()",8000);
	var newsS2=setTimeout("newsScroller2()",8000);

});

function newsScroller(){
		$("UL.news").animate({top:'-=170px'}, 1000);
		var newsS=setTimeout("newsScroller()",8000);
}

function newsScroller2(){
		$("UL.news2").animate({top:'-=170px'}, 1000, function(){
			if (parseInt($("UL.news2").css("top"))==0){
				$("UL.news").css("top", $("UL.news").height()+"px");
			}
			if (parseInt($("UL.news").css("top"))==0){
				$("UL.news2").css("top", $("UL.news2").height()+"px");
			}
		});
		var newsS=setTimeout("newsScroller2()",8000);
}
