// javascript document
//活力团队滚动
$(document).ready(function() {
var htdemo2 = "
"
$("#demo03 .list .wrap").each(function() {
var tid = $(this).index()
$(this).find("a").attr("data-id",tid)
htdemo2 += $(this).html()
if($(this).index()%8 == 7 && $(this).index() != $("#demo03 .list .wrap").length - 1){
htdemo2 += ""
}
});
htdemo2 += ""
$("#demo03 .slides").append(htdemo2)
});
$(function(){
$('#demo03').flexslider({
animation: "slide",
direction:"horizontal",
easing:"swing",
slidetostart: 0,
slideshowspeed: 7000, //7秒滚动
pauseonhover: false,
parseonaction:false,
//触屏滑动后继续自动轮播
after: function (slider) {
slider.pause();
slider.play();
}
});
});
//活力团队点击
$(document).ready(function(e) {
var i
var ai
var aihtml
$("#thelist a").live("click",function(){
i = $(this).attr("data-id")
tsh()
return false
})
function tsh(){
console.log(ai)
aihtml = $("#thebox a:eq("+i+")").html()
$("#thetc .inbox").html(aihtml)
$("#thetc").show()
}
$("#thetc .prev").click(function(){
if(i != 0){
i = i - 1
}else{
i = $("#thebox .wrap").length - 1
}
tsh()
})
$("#thetc .next").click(function(){
if(i != $("#thebox .wrap").length - 1){
i++
}else{
i = 0
}
tsh()
})
$("#thetc .box").click(function(){
return false
})
$("#thetc .box #close").click(function(){
$("#thetc").hide()
})
$(document).click(function(){
$("#thetc").hide()
})
});