Element.implement( {  
    // implement show  
    show: function () {  
        this.setStyle( 'display', '' );  
    },  
    // implement hide  
    hide: function () {  
        this.setStyle( 'display', 'none' );  
    }  
} );

String.implement( {
    // Изменение функции String.stripScripts
    //
    // Причина: 
    // В Mootools эта функция обрабатывает только inline-конструкции,
    // при этом скрипты с пустым телом - просто удаляет.
    // Исправленная функция подгружает такие скрипты к тело документа, во время процессинга
    // полученного html-кода.

    stripScripts: function (option){
        var scripts = '';
        var assets = [];

        var text = this.replace( /(<script [^>]*>([\s\S]*?)<\/script>)/gi, function () {
            if ( arguments[2].trim() == "" ) {
              var src = (getTagAttributes( 'src', arguments[1]))['src'];
              
              if(assets.length == 0) {
                scripts += 'var response_script_nodes = [];';
              }
              
              if ( src.trim() != '' && !assets.contains(src)) {
                  scripts += 'response_script_nodes.push(new Asset.javascript("' + src + '"));' + '\n';
                  assets.push(src);
              }
            } else {
              scripts += arguments[2] + '\n';
            }
            return '';
        } );
        
        if (option === true) $exec(scripts);
        else if ($type(option) == 'function') option(scripts, text);
        return text;
    }
});