function ask(type, variable)
{
    if (type == null) return false;
    if (variable == null) return false;
    var msg = '';
    var close = 0;
    switch (type)
    {
        case 'ban': msg = 'Вы действительно хотите добавить пользователя \'' + variable + '\' в Черный Список?'; break;
        case 'revert': msg = 'Вы действительно хотите вернуть пользователя \'' + variable + '\' в контакт-лист?'; break;
        case 'delete': msg = 'Вы действительно хотите удалить пользователя \'' + variable + '\' из списка?'; break;
        case 'serviceBuy': return checkForMoney( variable ); break;
    }
    return confirm(msg);
}

function doItPlease(act, var1, var2)
{
    if (act == null) return false;
    switch (act)
    {
        case 'loading':
            var1.disabled = true;
            var1.value = var2;
            break;
        case 'clearValues':
            if( confirm( 'Are you sure?' ) )
            {
                jQuery( 'input.values-' + var1 ).val( '' );
            }
            break;
        case 'generateKeys':
            if( confirm( 'Please confirm this operation...' ) )
            {
                doItPlease( 'loading', this.sbutton, 'Please wait...' );
                return true;
            }            
            break;
    }
    return false;
}

function show_mp3_player( path, id )
{
    if( jQuery( '#' + id ).size( ) > 0 )
    {
        jQuery( '#' + id + ' object' ).remove( );
        jQuery( '#' + id ).remove( );
        return false;
    }
    jQuery( '<div id="' + id + '"></div>' ).css({ "text-align": 'center' }).html( '<object type="application/x-shockwave-flash" data="/img/player_mp3_mini.swf" width="200" height="20">'
    + '<param name="movie" value="/img/player_mp3_mini.swf" />'
    + '<param name="bgcolor" value="#4b4a78" />'
    + '<param name="FlashVars" value="mp3=' + path + '&autoplay=1" />'
    + '</object>' ).appendTo( 'body' );
}

    jQuery(document).ready(function(){ 
        jQuery("ul.sf-menu").supersubs( { minWidth: 10, maxWidth: 35 } ).superfish({ 
            //animation: {height:'show'},
            delay:     200
        });
        jQuery("table.toZebra tr:nth-child(odd)").addClass("zebra_odd");
        
        //show_mp3_player( '/music/anthemmp3.mp3', 'gimn_mp3' );
    }); 
