$j(function(){
	
	if( $j( '#marquee' ).size() > 0 ){
		
		$j.Avaya.SifrConfig.masterReplace( $j.Avaya.SifrConfig.gothamLight, {
		
			selector: '.white-text .marquee-text h2',
			css: { '.sIFR-root': { 'color': '#ffffff', 'font-size': 37, 'leading': -4, 'letter-spacing': -1, 'cursor': 'pointer' } },
			selectable: false
		   
		} );
		
		$j.Avaya.SifrConfig.masterReplace( $j.Avaya.SifrConfig.gothamLight, {
			
			selector: '.marquee-text h2',
			css: { '.sIFR-root': { 'color': '#000000', 'font-size': 37, 'leading': -4, 'letter-spacing': -1, 'cursor': 'pointer' } },
			selectable: false
			
		} );
		
		
		
		if( $j( 'html' ).hasClass( 'sIFR-active' ) ) {
			
			$j.Avaya.global.marqueeOn = false;
			
			var marquee_base_data = {
				
				$tooltip_text_source : '.marquee-tooltip-text',
				$transitionCallback : function() {
					
					var cards = $j( this.s.$cards ),
						current_animated = cards.eq( this.current ).data( 'animated-card' ),
						next_animated = cards.eq( this.next ).data( 'animated-card' );
					
					
					if( current_animated ) {
						
						current_animated.clear( this );
					
					}
					
					if( next_animated ) {
						
						this.clearAnimationInterval();
						next_animated.animate( this );
						
					}
				}
				
			};
			
			$j( document ).bind( 'sifr_replaced', function() {
				
				if( !$j.Avaya.global.marqueeOn ){
					
					if( /Safari/g.test( navigator.userAgent ) && !/Chrome/g.test( navigator.userAgent ) ) {
						
						marquee_base_data[ '$sifr_transition_on' ] = false;
						
					}
					
					( new $j.Avaya.Marquee.Home( marquee_base_data ) ).init();
					
					$j.Avaya.global.marqueeOn = !$j.Avaya.global.marqueeOn;
					
				}
				
			});
			
		} else {
			
			( new $j.Avaya.Marquee.Home( marquee_base_data ) ).init();
		
		}
		
	}
	
	
	
	new $j.Avaya.MenuOverlay( {
		
		$item : '#explore-bar .menu-overlay-item',
		$position : {
			xoffset : -1,
			yaxis : 'outer-top'
		},
		
		$intent : true,
		
		$initCallback : function(){
			
			var self = this,
				items = $j(this.s.$item);
			
			
			if( $j.browser.msie && parseInt( $j.browser.version ) < 8 ) {
				
				items.each( function() { if( $j( this ).width() < 150 ) $j( this ).parent().width( '150' ); });
			
			}
			
		},
		$openCallback : function( el ){ el.parent().addClass( 'hovered-over' ); },
		$closeCallback : function( el ){ el.parent().removeClass( 'hovered-over' ); }
		
	} );
	
	
	new $j.Avaya.MenuOverlay( {
		
		$item : '#footer .menu-overlay-item',
		$position : {
			xaxis : 'inner-left',
			yaxis : 'inner-top', yoffset : -3
		},
		
		$onstate_replacer : true,
		
		$initCallback : function(){
			
			var item = $j( this.s.$item );
			
			
			item.width( $j( this.s.$item ).find( '.menu-link' ).width() + 3 );
			
			this.s.$position.xoffset = item.width() + 14;
			
			item.find( this.s.$replacerBody )
				.height( $j( this.s.$item ).height() + 18 )
				.width( this.s.$position.xoffset + 12 );
			
			item.find('.menu-overlay-content').each(function(){
				
				var el = $j( this ),
					$w = 0;
				
				
				el.children( 'ul' ).each( function() {
					
					$w += parseInt( $j( this ).css( 'width' ) )
						+ parseInt( $j( this ).css( 'paddingLeft' ) )
						+ parseInt( $j( this ).css( 'paddingRight' ) );
					
				} );
				
				el.width( $w + 'px' );
				
			} );
			
		},
		$openCallback : function( el ){ el.addClass( 'hovered-over' ); },
		$closeCallback : function( el ){ el.removeClass( 'hovered-over' ); }
		
	} );
	
	
	new $j.Avaya.Ticker( { $man_control : true } );
	
	
	$j( '#social-links a' ).click( function( e ) {
		
		s.clearVars();
		s.eVar39 = $j( document ).attr( 'title' );
		s.eVar40 = 'Body';
		s.eVar41 = 'Not Defined';
		s.eVar42 = $j( this ).find( 'img' ).attr( 'alt' );
		s.eVar43 = 'Not Defined';
		s.t();
	
	} );
	
});
