public static function getOnReadyScriptText($withoutReset = false)
 {
     $result = '';
     if (self::$onReady) {
         $result = 'jQuery(document).ready(function($){' . join("\n", self::$onReady) . "\n" . '})';
         if (!$withoutReset) {
             self::$onReady = array();
         }
     }
     return $result;
 }