/******************************************************************************
* 
*  Функциия выравнивает элемент вертикально по середине
* 
*/


jQuery.fn.VerticalAlign = function( opts )
{
    this.each( function()
    {
        var top = ( ( jQuery( this ).parent().height() - jQuery( this ).height()) / 2 );
        jQuery( this ).css( 'position', 'relative' );
        jQuery( this ).css( 'top', parseInt( top ) );
    });
    
    if( Elastic )
    {
        Elastic.refresh();
    }
    
    return;
};
