def js_include_tag(*scripts)
      options = scripts.last.is_a?(Hash) ? scripts.pop : {}
      return nil if scripts.empty?

      js_prefix = options[:prefix] || Merb::Plugins.config[:asset_helpers][:js_prefix]
      js_suffix = options[:suffix] || Merb::Plugins.config[:asset_helpers][:js_suffix]
      
      if (bundle_name = options[:bundle]) && Merb::Assets.bundle? && scripts.size > 1
        bundler = Merb::Assets::JavascriptAssetBundler.new(bundle_name, *scripts)
        bundled_asset = bundler.bundle!
        return js_include_tag(bundled_asset)
      end

      tags = ""

      for script in scripts
        src = js_prefix.to_s + asset_path(:javascript, script)
        
        if js_suffix
          ext_length = ASSET_FILE_EXTENSIONS[:javascript].length + 1
          src.insert(-ext_length,js_suffix)
        end

        if AssetsMixin.append_random_query_string?(options[:reload])
          src += src.include?('?') ? "&#{random_query_string}" : "?#{random_query_string}"
        end

        attrs = {
          :src => src,
          :type => "text/javascript"
        }
        tags << %Q{<script #{attrs.to_xml_attributes}></script>}
      end

      return tags
    end
def js_include_tag(*scripts)
      options = scripts.last.is_a?(Hash) ? scripts.pop : {}
      return nil if scripts.empty?

      js_prefix = options[:prefix] || Merb::Plugins.config[:asset_helpers][:js_prefix]
      js_suffix = options[:suffix] || Merb::Plugins.config[:asset_helpers][:js_suffix]
      
      if (bundle_name = options[:bundle]) && Merb::Assets.bundle? && scripts.size > 1
        bundler = Merb::Assets::JavascriptAssetBundler.new(bundle_name, *scripts)
        bundled_asset = bundler.bundle!
        return js_include_tag(bundled_asset)
      end

      tags = ""

      for script in scripts
        src = js_prefix.to_s + asset_path(:javascript, script)
        
        if js_suffix
          ext_length = ASSET_FILE_EXTENSIONS[:javascript].length + 1
          src.insert(-ext_length,js_suffix)
        end

        if AssetsMixin.append_random_query_string?(options[:reload])
          src += src.include?('?') ? "&#{random_query_string}" : "?#{random_query_string}"
        end

        attrs = {
          :src => src,
          :type => "text/javascript"
        }
        tags << %Q{<script #{attrs.to_xml_attributes}></script>}
      end

      return tags
    end
==== Parameters
 *scripts::
   The scripts to include. If the last element is a Hash, it will be used
   as options (see below). If ".js" is left out from the script names, it
   will be added to them.

 ==== Options
 :bundle<~to_s>::
   The name of the bundle the scripts should be combined into.
 :prefix<~to_s>::
   prefix to add to include tag, overrides any set in Merb::Plugins.config[:asset_helpers][:js_prefix]
 :suffix<~to_s>::
   suffix to add to include tag, overrides any set in Merb::Plugins.config[:asset_helpers][:js_suffix]
 :reload<Boolean>::
   Override the Merb::Config[:reload_templates] value. If true, a random query param will be appended
   to the js url

 ==== Returns
 String:: The JavaScript include tag(s).

 ==== Examples
   js_include_tag 'jquery'
   # => <script src="/javascripts/jquery.js" type="text/javascript"></script>

   js_include_tag 'moofx.js', 'upload'
   # => <script src="/javascripts/moofx.js" type="text/javascript"></script>
   #    <script src="/javascripts/upload.js" type="text/javascript"></script>

   js_include_tag :effects
   # => <script src="/javascripts/effects.js" type="text/javascript"></script>

   js_include_tag :jquery, :validation
   # => <script src="/javascripts/jquery.js" type="text/javascript"></script>
   #    <script src="/javascripts/validation.js" type="text/javascript"></script>

   js_include_tag :application, :validation, :prefix => "http://cdn.example.com"
   # => <script src="http://cdn.example.com/javascripts/application.js" type="text/javascript"></script>
   #    <script src="http://cdn.example.com/javascripts/validation.js" type="text/javascript"></script>

   js_include_tag :application, :validation, :suffix => ".#{MyApp.version}"
   # => <script src="/javascripts/application.1.0.3.js" type="text/javascript"></script>
   #    <script src="/javascripts/validation.1.0.3.js" type="text/javascript"></script>