jquery(document).ready(function() {
/*屏蔽鼠标右键*/
$(document).bind("contextmenu",function(e){
return false;
});
});
/** _swipperinit()
******************************* **/
function _swipperinit() {
var _swiper_container = jquery(".swiper-container"),
_effect = _swiper_container.attr('data-effect') || 'slide',
_autoplay = _swiper_container.attr('data-autoplay') || true,
_speed = _swiper_container.attr('data-speed') || 1000,
_columns = _swiper_container.attr('data-columns') || 1,
_loop = _swiper_container.attr('data-loop') || false;
// force int
if(_autoplay != false || _autoplay != 'false') {
_autoplay = parseint(_autoplay);
}
if(_loop == "true") {
_loop = true;
}
if(_effect == 'cube') {
var swiperslider = new swiper(_swiper_container, {
effect: _effect,
grabcursor: true,
speed: parseint(_speed),
cube: {
shadow: true,
slideshadows: true,
shadowoffset: 20,
shadowscale: 0.94
}
});
} else {
var swiperslider = new swiper(_swiper_container, {
pagination: '.swiper-pagination',
paginationclickable: '.swiper-pagination',
nextbutton: '.swiper-button-next',
prevbutton: '.swiper-button-prev',
spacebetween: 1,
speed: parseint(_speed),
loop: _loop,
autoplay: _autoplay || false,
effect: _effect,
grabcursor: false,
slidesperview: parseint(_columns)
});
}
}
jquery(document).ready(function() {
if(jquery(".camera_wrap").length > 0) {
_camerainit();
}
});
/** _camerainit()
******************************* **/
function _camerainit() {
var _slider = jquery('#camera_wrap_1'),
_height = _slider.attr('data-height') || '40%';
jquery(_slider).camera({
autoadvance: true,
thumbnails: true,
height: _height,
loader: 'none',
fx: 'scrollleft',
time:2500,
onloaded: function() {
$('#camera_wrap_1 .camera_next').html('');
$('#camera_wrap_1 .camera_prev').html('');
}
});
}