jQuery.noConflict();
(function ($) {
 $(document).ready(function(){   
      $('a').bind('focus',function(){
		if(this.blur){ 
			this.blur();
		 }		
	});	
	$('#navmenu  li').each( function(){				 
		$(this).hover(function(){					
				$(this).find('ul').eq(0).css('display','none');	
		},function(){			
				$(this).find('ul').css('display','none');								
		});
	});
	$('.button-search').attr('value','');
	$('#navmenu ul ul ul ').css('display','none');
	$('[href='+$('#current a').attr('href')+']').parent().addClass('active');
	
	function backfn1(i){				
		$(buts1.join()).removeClass('spca');	
		$(buts1.join()).eq(i).addClass('spca');
	}
	var buts1=['#spc a'];
	var tabs1=['.moduletable-spc'];
	$.ml.butShowTab(buts1,tabs1,0,'click',null,backfn1);	
	
	$('#spc a:first').addClass('spca').width('190px').addClass('marginl5');
	$('.moduletable-pro > ul > li').each(function(){
		$(this).find('> a').click(function(){
			if($(this).parent().hasClass('active'))return false;
			$(this).parent().parent().find('.active').removeClass('active');
			$(this).parent().toggleClass('active');
			$(this).parent().parent().find('ul:visible').slideUp('slow');
			$(this).next('ul').slideToggle('slow');
			return false;
		});
	});
	$('.moduletable-pro li').each(function(){
			if($(this).attr('id')=='current'){
				$(this).parent().css('display','block');
				$(this).parent().parent().addClass('active');
			}
	});	
	//$('.list-products tr').each(function(){
	//	$('.list-products tr').find('td').eq(1).width('86px');
	//});
	$('.sectiontableheader-news:first').text('Title').css('text-align','center');
	$('.sectiontableheader-news:last').text('Date');
	$('.list-products  tr:even').addClass('treven');
	$('.list-products  tr:odd').addClass('trodd');
	$('.list-products  tbody tr').hover(	
		function() {$(this).addClass('highlight');},
		function() {$(this).removeClass('highlight');}
	);
	$('.button').attr('value','');
	$('.content-spc:first  .item-spc').wrapAll('<div class='+'scrollDiv'+'></div>');
	$('.content-spc:first > .item-spc').each(function(){
		$(this).width('600px;');	    
	})
	scrollDiv();
	});
	function scrollDiv(){	
	speed=50;
	$('.scrollDiv').each(function(){
	$(this).parent().css('position','relative');
	$(this).css('position','absolute');
	 var html = $(this).html();
	 $(this).html(html+html);
	var marquee=theMarquee($(this));
	 var MyMar=setInterval(marquee,speed)
	 $(this).mouseover(function() {clearInterval(MyMar)});
	$(this).mouseout(function() {MyMar=setInterval(marquee,speed)});
	 });
}

function theMarquee(the){
	return (function(){
	if(the.position().top+the.height()/2<=0)
		the.css('top',0);
	else{
		the.css('top',the.position().top-1+'px');
	}
	 });
} 
})(jQuery);
	

