|
|
Line 516: |
Line 516: |
| data=[];//]]> | | data=[];//]]> |
| </script> | | </script> |
− | <script type="text/javascript">
| |
− | //experienceIntercal change
| |
− | var experienceInterval;
| |
− | function experienceGalleryNext() {
| |
− | var $active = $('#realcontent #homeIndex a.experience .gallery img.active');
| |
− | if ( $active.length == 0 ) $active = $('#realcontent #homeIndex a.experience .gallery img:last');
| |
− | var $next = $active.next().length ? $active.next() : $('#realcontent #homeIndex a.experience .gallery img:first');
| |
− | $active.addClass('lastActive');
| |
− | $next.css({opacity: 0.0})
| |
− | .addClass('active')
| |
− | .animate({opacity: 1.0}, 700, function() {
| |
− | $active.removeClass('active lastActive');
| |
− | });
| |
− | }
| |
− | $('.no-touch #realcontent #homeIndex a.experience').hover(function(){
| |
− | var $gallery = $(this).find('.gallery');
| |
− | $gallery.stop().animate({
| |
− | scale:1,
| |
− | opacity:1
| |
− | },500, 'easeOutCubic');
| |
− | experienceInterval = window.setInterval(experienceGalleryNext, 1000);
| |
− | }, function(){
| |
− | window.clearInterval(experienceInterval);
| |
− | var $gallery = $(this).find('.gallery');
| |
− | $gallery.stop().animate({
| |
− | scale:1.5,
| |
− | opacity:0
| |
− | },500, 'easeOutCubic', function(){
| |
− | window.clearInterval(experienceInterval);
| |
− | });
| |
− | });
| |
− |
| |
− |
| |
− |
| |
− | // swipe beer
| |
− | var swipeBeer = new Swipe(document.getElementById('swipeBeer'), {
| |
− | speed: 400,
| |
− | auto: false,
| |
− | continuous: true,
| |
− | disableScroll: false,
| |
− | stopPropagation: false,
| |
− | callback: function(index, elem) {},
| |
− | transitionEnd: function(index, elem) {}
| |
− | });
| |
− |
| |
− | var timeout;
| |
− | function again()
| |
− | {
| |
− | window.clearTimeout(timeout);
| |
− | timeout = window.setTimeout(function(){
| |
− | swipeBeer.next();
| |
− | again();
| |
− | }, 1400);
| |
− | }
| |
− | $('.no-touch #realcontent #homeIndex a.beer').hover(function(){
| |
− | swipeBeer.next();
| |
− | again();
| |
− | }, function(){
| |
− | window.clearTimeout(timeout);
| |
− | });
| |
| | | |
| </script> | | </script> |
| </body> | | </body> |
| </html> | | </html> |