$(function(){
		
		function onBefore() {
			$('#pic_news_text').html('<h2>' + $(this).children()[0].alt + '</h2>').hide().show();
		};
		
		$('.text_list').each(
            function (t) {
                $(this).find('li:odd').addClass('odd');
            }
        );

		$.fn.cycle.updateActivePagerLink = function(pager, currSlideIndex) {
			$(pager).find('li').removeClass('active_slide').filter('li:eq('+currSlideIndex+')').addClass('active_slide');
				};
				$('.pic_news').cycle({
					fx: 'fade',
					delay: 2000,
					speed: 3000,
					before: onBefore,
					pager: '.pic_news_nav',
					pagerAnchorBuilder: function(idx, slide) {
					return '.pic_news_nav li:eq(' + idx + ') a';
			}
		});
		
		$.fn.cycle.updateActivePagerLink = function(pager, currSlideIndex) {
			$(pager).find('li').removeClass('active_slide').filter('li:eq('+currSlideIndex+')').addClass('active_slide');
				};
				$('.booth_pics').cycle({
					fx: 'fade',
					delay: 2000,
					speed: 3000,
					prev: '.left', 
					next: '.right',
					pager: '.booth_navi',
					pagerAnchorBuilder: function(idx, slide) {
					return '.booth_navi li:eq(' + idx + ') a';
			}
		});

		$('.son_ul').hide(); //初始ul隐藏
		$('.select_box span').click(function(){ //鼠标移动函数
			  $(this).addClass('click');
			  $(this).parent().find('.son_ul').slideDown('fast');  //找到ul.son_ul显示
			  $(this).parent().find('li').hover(function(){$(this).addClass('hover')},function(){$(this).removeClass('hover')}); //li的hover效果
			  });
		$('ul.son_ul li').click(function(){
			  $('.select_box span').removeClass('click');
			  $(this).parents('li').find('span').html($(this).html());
			  $(this).parents('li').find('ul').slideUp('fast');
			  });
		
		

		$(".sub_navi > li").hover(function(){
			$(this).addClass("selected");
			$(this).children("dl").show();
		},function(){
			$(this).removeClass("selected");
			$(this).children("dl").hide();
		})
		
		$(function(){
			var _wrap=$('ul.line');//定义滚动区域
			var _interval=2000;//定义滚动间隙时间
			var _moving;//需要清除的动画
			_wrap.hover(function(){
				clearInterval(_moving);//当鼠标在滚动区域中时,停止滚动
			},function(){
				_moving=setInterval(function(){
					var _field=_wrap.find('li:first');//此变量不可放置于函数起始处,li:first取值是变化的
					var _h=_field.height();//取得每次滚动高度(多行滚动情况下,此变量不可置于开始处,否则会有间隔时长延时)
					_field.animate({marginTop:-_h+'px'},600,function(){//通过取负margin值,隐藏第一行
						_field.css('marginTop',0).appendTo(_wrap);//隐藏后,将该行的margin值置零,并插入到最后,实现无缝滚动
					})
				},_interval)//滚动间隔时间取决于_interval
			}).trigger('mouseleave');//函数载入时,模拟执行mouseleave,即自动滚动
		});
		
		$(function(){ 
		  //多行应用@Mr.Think 
		  var _wrap=$('ul.mulitline');//定义滚动区域 
		  var _interval=3000;//定义滚动间隙时间 
		  var _moving;//需要清除的动画 
		  _wrap.hover(function(){ 
		  clearInterval(_moving);//当鼠标在滚动区域中时,停止滚动 
		},function(){ 
		  _moving=setInterval(function(){ 
		  var _field=_wrap.find('li:first');//此变量不可放置于函数起始处,li:first取值是变化的 
		  var _h=_field.height();//取得每次滚动高度 
		  _field.animate({marginTop:-_h+'px'},600,function(){//通过取负margin值,隐藏第一行 
		  _field.css('marginTop',0).appendTo(_wrap);//隐藏后,将该行的margin值置零,并插入到最后,实现无缝滚动 
		}) 
		},_interval)//滚动间隔时间取决于_interval 
		}).trigger('mouseleave');//函数载入时,模拟执行mouseleave,即自动滚动 
		}); 
		
		$(function(){ 
		//多行应用@Mr.Think 
			var _wrap=$('ul.scroll');//定义滚动区域 
			var _interval=3000;//定义滚动间隙时间 
			var _moving;//需要清除的动画 
			_wrap.hover(function(){ 
			clearInterval(_moving);//当鼠标在滚动区域中时,停止滚动 
			},function(){ 
			_moving=setInterval(function(){ 
			var _field=_wrap.find('li:first');//此变量不可放置于函数起始处,li:first取值是变化的 
			var _h=_field.height();//取得每次滚动高度 
			_field.animate({marginTop:-_h+'px'},600,function(){//通过取负margin值,隐藏第一行 
			_field.css('marginTop',0).appendTo(_wrap);//隐藏后,将该行的margin值置零,并插入到最后,实现无缝滚动 
			}) 
			},_interval)//滚动间隔时间取决于_interval 
			}).trigger('mouseleave');//函数载入时,模拟执行mouseleave,即自动滚动 
		}); 
		
		$('.box_tabs,.search_tabs').tabs({event:'mouseover'});
		$(".box_content ul li").mouseover(function () { $(this).addClass('over'); } );
		$(".box_content ul li").mouseout(function () { $(this).removeClass('over'); } );
		$(".list_partners li").mouseover(function () { $(this).addClass('over'); } );
		$(".list_partners li").mouseout(function () { $(this).removeClass('over'); } );
		$(".links li").mouseover(function () { $(this).addClass('over'); } );
		$(".links li").mouseout(function () { $(this).removeClass('over'); } );
		$(".left,.right").mouseover(function () { $(this).addClass('show'); } );
		$(".left,.right").mouseout(function () { $(this).removeClass('show'); } );
		$(".tuangou_list ul li").mouseover(function () { $(this).addClass('over'); } );
		$(".tuangou_list ul li").mouseout(function () { $(this).removeClass('over'); } );
		$(".box_tabs a").focus(function () { this.blur()}); 
		$('.other_links li:eq(1),.other_links li:eq(3),.tuangou_list ul li:eq(2),.tuangou_list ul li:eq(5),.tuangou_list ul li:eq(8),.tuangou_list ul li:eq(11),.tuangou_list ul li:eq(14),.tuangou_list ul li:eq(17),.tuangou_list ul li:eq(20),.booth_navi li:last').addClass('mar0');
		$('.border_box_content .border_pro_box:last').addClass('padmar0');
		DD_belatedPNG.fix('.icon_new,.icon_hot,.enter_company_logo img,.table_company_l img');
		$('.enter_company_list li:odd').addClass('odd');
		$('.enter_company_list li:last,.online_services li:last,.other_links li:last').addClass('last');
		$('.links li:eq(1),.links li:eq(3)').addClass('mar0');
		$('.table_company_header .r').click(function(){
				$('.table_company').hide();
			});
		$('.member_right .member_box:last').addClass('last');
		/*
		$(".add").click(function(){
			  $(this).parents().find('.add_pics_box').append("<div class='add_pics'><input class='text_input' type='text' name='textfield' /> <input type='button' value='上传'/><a class='close_pics'>删除</a></div>");
			});
		$(".add_promotion").click(function(){
			  $(this).parents().find('.promotions').append("<div class='promotion_box'><div class='l'><input class='text_input60' type='text' name='textfield' />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;价格 <input class='text_input60' type='text' name='textfield' id='textfield' /> <select name=''><option>RMB人民币</option></select></div><div class='l'><div class='promotion'><input class='checked' name='' type='checkbox' value='' /> 限时优惠</div><div class='checked_box'>优惠价：<input class='text_input60' type='text' name='textfield' id='textfield' />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input class='text_input_data' type='text' name='textfield' id='textfield' /></div></div></div>");
			});
		*/
		$('.main_navi ul li:last,.process ul li:last').addClass('last');
		
		$('#scroll li.close').click(function(){
			  $('#scroll').hide();
			  });
		
});
