/js/jquery.js"> /js/jqueryui.min.js"> /js/slider.js"> var current = 0; function ___to(index) { $("#li0").removeClass(); $("#li1").removeClass(); $("#li8").removeClass(); $("#li" + index).addClass('active'); $('#main').carousel(index); if (index == 0 || index == 8) { if (index > current) { $('#__ind').animate({ left : "-100%" }); } else { $('#__ind').animate({ left : "100%", speed : 600, callback : function() { this.hide(); } }); } } else { $('#__ind').show(); $('#__ind').animate({ left : "0" }); } $('#main').carousel('pause'); current = index; if (index == 1) { _slide(1); } } function ___to2(index) { ____to2(index); _slide(index); } function ____to2(index) { current = index; $('#main').carousel(index); $('#main').carousel('pause'); } function ___slide() { $('#__ind').animate({ left : "-50", callback : function() { this.hide(); } }); } function _slide(index) { $("#glass").animate({ left : $('#gs').offset().left + 39 + (index - 1) * 128, speed : 600 }); $("#glass-bg").animate({ left : $('#gs').offset().left + 39 + (index - 1) * 128, speed : 600 }); } function _left(index) { var slide = $('#' + index).unslider(); slide.prev(); } function _right(index) { var slide = $('#' + index).unslider(); slide.next(); } function preSub() { var is = $('#_i_a').find('input'); var b = true; for (var i = 0; i < is.length; i++) { var v = $(is[i]).val(); if ($.trim(v) == '') { b = false; break; } } var c = $('#_i_a').find('textarea').val(); if (b) { c = $.trim(c); if (c == '') b = false; } if (b) { $('#_sub_info').removeAttr('disabled'); } else { $('#_sub_info').attr('disabled', 'disabled'); } } function send() { $('#infoModal').modal('toggle'); var is = $('#_i_a').find('input'); var d = ''; for (var i = 0; i < is.length; i++) { var v = $(is[i]).val(); v = $.trim(v); d += $(is[i]).attr('placeholder'); d += ":" d += v + "\n"; } var t = $('#_i_a').find('textarea'); var c = t.val(); c = $.trim(c); d += $(t).attr('placeholder'); d += ":" d += c; $.ajax({ type : 'post', url : '_submit.jsp', data : 'data=' + d, dataType : 'text', success : function(msg) { $('#infoModal').modal('toggle'); if ($.trim(msg) == "ok") { $('#myModal').modal('toggle'); } }, error : function() { $('#infoModal').modal('toggle'); } }); } $(function() { $('#main').carousel('pause'); $('#li8').css('font-size', '18px'); $.scrolltotop({ controlHTML : '', offsety : 60, offsetx : 60 }); $.each($('.banners'), function(i, item) { $(item).unslider(); }); $("#glass").draggable({ axis : "x", containment : "parent", drag : function(event, ui) { $("#glass-bg").css({ left : $(this).css('left') }); }, stop : function(event, ui) { var left = $("#glass").offset().left; left = left - $('#gs').offset().left - 39; ___to2(Math.round(left / 128) + 1); } }); }); $(document).keydown(function(e) { var key = e.which; if (current > 0 && current < 8) { if (key == 37) { var i = current - 1; if (i > 0) { ___to2(i); } } else if (key == 39) { var i = current + 1; if (i < 8) { ___to2(i); } } } }); /js/bootstrap.min.js"> /js/scrolltotop.js">