$(function(){
  $('.topBar .s').hover(function(){
    $(this).find('.sub').stop().slideToggle();
  });
  $(".pselect").click(function(){
    $(this).next(".option").fadeToggle();
  });
  $(".option li").click(function(){
    var vals =$(this).text();
    var date =$(this).attr("date-modid");
    $(".pselect").text(vals);
    $(".option").hide();
    $("#modelid").val(date);
  });

   /*鼠标移过，左右按钮显示*/
   jQuery(".banner").hover(function(){
      $(".banner .prev").stop(true,true).animate({
       left: '-50px',opacity: '1'
      })
      $(".banner .next").stop(true,true).animate({
       right: '-1250px',opacity: '1'
      })
     },function(){
       $(".banner .prev").stop(true,true).animate({
        left: '-90px',opacity: '0'
       })
       $(".banner .next").stop(true,true).animate({
        right: '-1310px',opacity: '0'
       })
     });

   /*SuperSlide图片切换*/
  jQuery(".banner").slide({titCell:".hd li",mainCell:".bd ul", effect:"fold",autoPlay:true,easing:"easeOutCirc",interTime:3000});
  /* 案例 */
  jQuery(".caseSlide").slide({ mainCell:".ohbox ul",autoPage:true,effect:"leftLoop",autoPlay:true,scroll:1,vis:3,interTime:4500});
  /* 荣誉证书 */
  jQuery(".setting").slide({ titCell:".menu a", mainCell:".settingMain",delayTime:600,prevCell:false,nextCell:false});
  jQuery(".settingBox").slide({mainCell:"ul",autoPlay:true,effect:"leftMarquee",vis:4,interTime:50});
  jQuery(".proShow_pic").slide({titCell:".hd ul",mainCell:".bd",autoPage:true,effect:"fold",autoPlay:true,vis:1,interTime:4000});
});
/* 客服 */
$(document).ready(function(){
  $(".gr_kefu .kf1").click(function(){
    $('.gr_kefu .qq').find(".sidebox").stop().animate({"right":"0"},160);
    $(this).find(".sidebox").stop().animate({"right":"-50px"},160);
   });
    $(".gr_kefu .qq .close").click(function(){
      $('.gr_kefu .qq').find(".sidebox").stop().animate({"right":"-150px"},160);
      $('.gr_kefu .kf1').find(".sidebox").stop().animate({"right":"0"},160);
     });
    $(".gr_kefu .kf3").hover(function(){
        $(this).find(".sidebox").stop().animate({"width":"130px"},160);
        $(this).find(".sidebox3").stop().animate({"width":"200px"},160);
    },function(){
        $(this).find(".sidebox").stop().animate({"width":"50px"},160);
    });
    $('.gr_kefu .kf2').hover(function() {
        $(this).find('.kf_wx').fadeIn();
    }, function() {
        $(this).find('.kf_wx').fadeOut();
    });
});
//回到顶部
function goTop(){
  $('html,body').animate({'scrollTop':0},600);
}
