﻿$().ready( function() { alignPanels(); fadeOut(); } );

function alignPanels()
{
    if ( $( "#left_panel" ) && $( "#left_panel" ).height() < $( "#features" ).outerHeight() )
    {
        $( "#left_panel_footer" ).height( $( "#features" ).outerHeight() - $( "#left_panel" ).outerHeight() );
    }
    else if ( $( "#left_panel" ) && $( "#left_panel" ).height() > $( "#features" ).outerHeight() )
    {
        var padding = $( "#features" ).outerHeight() - $( "#features" ).height();
        
        $( "#features" ).height( $( "#left_panel" ).height() - padding );
    }
}

function fadeIn()
{
    window.setTimeout( function() { $( "#pic_main_07_02" ).fadeIn( 1500, fadeOut ); }, 3000 );
}

function fadeOut()
{
    window.setTimeout( function() { $( "#pic_main_07_02" ).fadeOut( 1500, fadeIn ); }, 3000 );
}

function highlightImage( button, highlight )
{
	if ( highlight )
	{
		button.src = button.src.replace( "-off.jpg", "-on.jpg" ).replace( "-off.png", "-on.png" );
	}
	else
	{
		button.src = button.src.replace( "-on.jpg", "-off.jpg" ).replace( "-on.png", "-off.png" );
	}			
}