window.addEvent('domready', function(){ // The same as before: adding events $('main_news').addEvents({ 'mouseenter': function(){ // Always sets the duration of the tween to 1000 ms and a bouncing transition // And then tweens the height of the element this.set('tween', { duration: 1000, transition: Fx.Transitions.Bounce.easeOut // This could have been also 'bounce:out' }).tween('height', '76px'); }, 'mouseleave': function(){ // Resets the tween and changes the element back to its original size this.set('tween', {}).tween('height', '24px'); } }); $('main_dienstleistung').addEvents({ 'mouseenter': function(){ // Always sets the duration of the tween to 1000 ms and a bouncing transition // And then tweens the height of the element this.set('tween', { duration: 1000, transition: Fx.Transitions.Bounce.easeOut // This could have been also 'bounce:out' }).tween('height', '152px'); }, 'mouseleave': function(){ // Resets the tween and changes the element back to its original size this.set('tween', {}).tween('height', '24px'); } }); $('main_produkte').addEvents({ 'mouseenter': function(){ // Always sets the duration of the tween to 1000 ms and a bouncing transition // And then tweens the height of the element this.set('tween', { duration: 1000, transition: Fx.Transitions.Bounce.easeOut // This could have been also 'bounce:out' }).tween('height', '76px'); }, 'mouseleave': function(){ // Resets the tween and changes the element back to its original size this.set('tween', {}).tween('height', '24px'); } }); $('main_portrait').addEvents({ 'mouseenter': function(){ // Always sets the duration of the tween to 1000 ms and a bouncing transition // And then tweens the height of the element this.set('tween', { duration: 1000, transition: Fx.Transitions.Bounce.easeOut // This could have been also 'bounce:out' }).tween('height', '176px'); }, 'mouseleave': function(){ // Resets the tween and changes the element back to its original size this.set('tween', {}).tween('height', '24px'); } }); $('main_kunden').addEvents({ 'mouseenter': function(){ // Always sets the duration of the tween to 1000 ms and a bouncing transition // And then tweens the height of the element this.set('tween', { duration: 1000, transition: Fx.Transitions.Bounce.easeOut // This could have been also 'bounce:out' }).tween('height', '226px'); }, 'mouseleave': function(){ // Resets the tween and changes the element back to its original size this.set('tween', {}).tween('height', '24px'); } }); });