//婊戝姩寮瑰嚭鏁堟灉
artdialog.slide = function (options) {
var opt = options || {},
api, aconfig, hide, wrap, top,
duration = 400,steep=50,easing='linear';
var config = {
init: function(here){
api = this;
aconfig = api.config;
wrap = api.dom.wrap;
top = parseint(wrap[0].style.top);
hide = parseint(top + steep);
wrap.css({'top': hide + 'px',opacity: 0})
.animate({top: top + 'px',opacity: 1}, duration,easing, function () {
opt.init && opt.init.call(api, here);
});
},
close: function(here){
wrap.animate({top: top-steep + 'px',opacity: 0}, duration,easing, function () {
opt.close && opt.close.call(this, here);
aconfig.close = $.noop;
api.close();
wrap.css('top', hide + 'px');
});
return false;
}
};
for (var i in opt) {
if (config[i] === undefined) config[i] = opt[i];
};
return artdialog(config);
};
//
$(function(){
// $('#nav a').hover(function(){
// $('#nav a').removeclass('selected');
// $(this).addclass('selected');
// });
$('.top').click(function(){
$('body,html').animate({scrolltop:0},1000);
});
//banner鏁堟灉
$('#kv').caroufredsel({
auto: {
timeoutduration:8000
},
prev:"#kv_prev",
next:'#kv_next',
responsive: true,
direction : "left",
width: '100%',
scroll: {
fx:"crossfade",
easing:'swing',
duration:'500'
},
pagination: {
container:"#kv_page",
anchorbuilder:function( nr ) {
return "";
}
}
});
//浣滃搧婊氬姩鏁堟灉
$('#works_con').caroufredsel({
circular: false,
infinite: false,
auto: false,
prev:"#works_prev",
next:'#works_next',
scroll:"easeinoutcirc",
pagination: {
container:"#works_page",
anchorbuilder:function( nr ) {
return "";
}
}
});
//鏂伴椈婊氬姩鏁堟灉
$('#news_con').caroufredsel({
circular: false,
infinite: false,
auto: false,
prev:"#news_prev",
next:'#news_next',
scroll:"easeinoutcirc",
pagination: {
container:"#news_page",
anchorbuilder:function( nr ) {
return ""+nr+" ";
}
}
});
//鍏充簬鎴戜滑婊氬姩鏁堟灉
$('#about_con').caroufredsel({
responsive: true,
circular: false,
infinite: false,
auto: false,
scroll: {
fx:"crossfade",
easing:'swing',
duration:'500'
}
});
$('#about_cat > a').bind('click',function(){
$index = $('#about_cat > a').index($(this));
$('#about_cat > a').removeclass('selected').eq($index).addclass('selected');
$("#about_con").trigger("slidetopage", $index);
});
//鍏充簬鎴戜滑婊氬姩鏁堟灉
$('#service_con').caroufredsel({
responsive: true,
circular: false,
infinite: false,
auto: false,
scroll: {
fx:"crossfade",
easing:'swing',
duration:'500'
}
});
$('#service_cat > a').bind('click',function(){
$index = $('#service_cat > a').index($(this));
$('#service_cat > a').removeclass('selected').eq($index).addclass('selected');
$("#service_con").trigger("slidetopage", $index);
});
});
function showwindow(id){
$('#newinfo').find('h4').html($(id).parent().find('h4').html());
$('#newinfo').find('p').html('post time'+$(id).attr('data'));
$('#newinfo').find('.con').html($(id).parent().find('.data_con').html());
var news=art.dialog.slide({
fixed: false,
drag: false,
resize: false,
follow: null,
title: '',
lock: true,
padding:"0px 0px",
content: $('#newinfo').get(0),
init:function(){
$('.newinfo .close').click(function(){
news.close();
});
}
});
}
function showteam(id){
var team=art.dialog.slide({
fixed: false,
drag: false,
resize: false,
follow: null,
title: '',
lock: true,
padding:"0px 0px",
content: $(id).parent().find('.data_con').find('.newinfo').get(0),
init:function(){
$('.newinfo .close').click(function(){
team.close();
});
}
});
}