showIndexArea(index);
});
});
}
}
/**
* 显示指定元素的大图
*/
function showIndexArea(index){
var imgSrc = $(“#”+opts.objId + ” ul li:eq(” + index + “) img:first”).attr(“src”);
var imgAlt = $(“#”+opts.objId + ” ul li:eq(” + index + “) img:first”).attr(“alt”);
// 淡化显示其余图片
$(“#”+opts.objId + ” ul li:lt(” + index + “)”).css({
opacity:0.5
});
$(“#”+opts.objId + ” ul li:gt(” + index + “)”).css({
opacity:0.5
});
$(“#”+opts.objId + ” ul li:eq(” + index + “)”).css({
opacity:1
});
// 显示大图
$(“#”+opts.showArea + ” img:first”).attr(“src”, imgSrc);
// 显示标题
if(opts.showTitle){
$(“#manualScroll_banner”).text(imgAlt);
}
}
/**
* 鼠标滑上后显示按钮
*/
$(“#”+opts.objId).hover(function() {
$(“#button_left”).css({
opacity:1
});
$(“#button_right”).css({
opacity:1
});
},function() {
$(“#button_left”).css({
opacity:opts.opacity
});
$(“#button_right”).css({
opacity:opts.opacity
});
}).trigger(“mouseleave”);
/**
* 最先执行的函数
* 鼠标滑上焦点图时停止自动播放,滑出时开始自动播放
*/
// 初始化大图
showArea();
$(“#”+opts.objId).hover(function() {
clearInterval(opts.picTimer);
},function() {
opts.picTimer = setInterval(function() {
scrollLeft();
},opts.interval); // 自动播放的间隔,单位:毫秒
}).trigger(“mouseleave”);
}
});










