window.addEvent( 'load', function() {
	var inOpacity  = 0.85;
	var outOpacity = 1.00;
	
	var bdg1 = $( 'badge1' );
	var bdg2 = $( 'badge2' );
	var bdg3 = $( 'badge3' );
	var bdg4 = $( 'badge4' );

	var bdg1Fx = new Fx.Tween( $( 'badge1tag' ), { duration: 350,
												   transition: Fx.Transitions.Quad.easeInOut,
												   wait: false } );
	
	var bdg2Fx = new Fx.Tween( $( 'badge2tag' ), { duration: 350,
												   transition: Fx.Transitions.Quad.easeInOut,
												   wait: false } );
	
	var bdg3Fx = new Fx.Tween( $( 'badge3tag' ), { duration: 350,
												   transition: Fx.Transitions.Quad.easeInOut,
												   wait: false } );
	
	var bdg4Fx = new Fx.Tween( $( 'badge4tag' ), { duration: 350,
												   transition: Fx.Transitions.Quad.easeInOut,
												   wait: false } );
	

	// Setting the initial position of the element outside the overflow margin
    $( 'badge1tag' ).setPosition( { x: 265, y: 302 } );

	// Creating the MouseENTER and MouseLEAVE actions
	bdg1.addEvents( {
		mouseenter: function() {
			$( 'badge1tag' ).fade( inOpacity );
			bdg1Fx.start( 'left', '265px', '70px' );	
		},
		mouseleave: function() {
			$( 'badge1tag' ).fade( outOpacity )
			bdg1Fx.start( 'left', '70px', '265px' );	
		}
	} );

	// Setting the initial position of the element outside the overflow margin
    $( 'badge2tag' ).setPosition( { x: -290, y: 302 } );

	// Creating the MouseENTER and MouseLEAVE actions
	bdg2.addEvents( {
		mouseenter: function() {
			$( 'badge2tag' ).fade( inOpacity );
			bdg2Fx.start( 'left', '-290px', '-95px' );	
		},
		mouseleave: function() {
			$( 'badge2tag' ).fade( outOpacity )
			bdg2Fx.start( 'left', '-95px', '-290px' );	
		}
	} );

	// Setting the initial position of the element outside the overflow margin
    $( 'badge3tag' ).setPosition( { x: 265, y: -2 } );

	// Creating the MouseENTER and MouseLEAVE actions
	bdg3.addEvents({
		mouseenter: function() {
			$( 'badge3tag' ).fade( inOpacity );
			bdg3Fx.start( 'left', '265px', '70px' );	
		},
		mouseleave: function() {
			$( 'badge3tag' ).fade( outOpacity )
			bdg3Fx.start( 'left', '70px', '265px' );	
		}
	} );

	// Setting the initial position of the element outside the overflow margin
    $( 'badge4tag' ).setPosition( { x: -290, y: -2 } );

	// Creating the MouseENTER and MouseLEAVE actions
	bdg4.addEvents( {
		mouseenter: function() {
			$( 'badge4tag' ).fade( inOpacity );
			bdg4Fx.start( 'left', '-290px', '-95px' );	
		},
		mouseleave: function() {
			$( 'badge4tag' ).fade( outOpacity )
			bdg4Fx.start( 'left', '-95px', '-290px' );	
		}
	} );

} );
