
$(window).load(function(){
	$(".swiper-loading").hide();
	$(".device").show();	
	SwiperSlide();

	var mySwiper = new Swiper('.swiper-container',{
		pagination: '.pagination',
		loop: true,
		grabCursor: true,
		paginationClickable: true
	});
});

function SwiperSlide(){
	var _img = $(".swiper-slide > img").eq(0);
	var _imgw = _img.width();
	var _imgh = _img.height();
	
	var _body = $(window).width()-24;		
	var percent = parseFloat(_body/_imgw).toFixed(3);

	$(".swiper-container").css("width", _body+"px").css("height", (_imgh*percent)+"px");
	$(".swiper-slide > img").css("width", "100%");
	
	loadtop();
	loadmain();
	loadfoot();
}

if (document.attachEvent) {
	window.attachEvent('onresize', SwiperSlide); 
} else {
	window.addEventListener('resize', SwiperSlide, false); 
}
