$( document ).ready( function()
{	
	if( window.location.pathname == "/" )
	{
		$( '#col2 .stdCon:first' )
			.attr({ id: 'indexGraphicConOuter' });
			
		$( '#col2 .stdUserContent:first' )
			.attr({ id: 'indexGraphicCon' });
			
		for( i = 5; i > 0; i-- )
		{
			$( '#indexGraphicCon' ).prepend
			( 
				$( '<div />' )
					.addClass( 'contentSpacer' )
					.attr({ id: 'contentSpacer-'+ i })
			)
		}
	}
	
	$dealPages = $( '.dealPage' );
	if( $dealPages.length )
	{
		$( '#dealContainer' ).addClass( 'jsDealContainer' );
		$( '.dealPage:eq(0)' ).addClass( 'active' );
		$( '.dealPager' ).each( function()
		{
			$( this ).find( '.dealPagerButton:first' ).addClass( 'active' );
		});
		$( '.dealPagerButton a' ).click( function()
		{
			if( $( this ).is( '.active' ) )
				return;
				
			$( '#dealContainer .active' ).removeClass( 'active' );
			idx = $( this ).parents( 'ul' ).find( 'li' ).index( $( this ).parent() );
			$( '.dealPage:eq('+ idx +')' ).addClass( 'active' );
			
			$( '.dealPager' ).each( function()
			{
				$( this ).find( '.dealPagerButton:eq('+ idx +')' ).addClass( 'active' );
			});

		});
	}
});
