   source = if source[0] == '/'
     source
   else
-    prefix_path = H.defaultPath[options['type']]
+    prefix_path = @defaultPath[options['type']]
     if prefix_path[prefix_path.length-1] == '/'
       prefix_path + source
     else


helper 'assetPath', (source, options = {}) ->
  source  = source.toString()
  options = H._clone options

  fullDoaminPath = /[\w\d]+\:\/\//i
  return source if fullDoaminPath.test(source) || source[0..1] == '//'

  H.computeAssetPath source, options

helper 'assetUrl', (source, options = {}) ->
  source  = source.toString()
  options = H._clone options

  options['domain'] ||= if options['type']
    H.domain[options['type']] || H.domain.asset
  else
    H.domain.asset

  H.assetPath source, options

assetPathBuilder = (_type) ->
  type_built = _type
  (source, options = {}) ->
    options = H._clone options
    options['type'] = type_built if options['type'] == undefined
    H.assetPath source, options

assetUrlBuilder = (_type) ->
  type_built = _type
  (source, options = {}) ->
    options = H._clone options
    options['type'] = type_built if options['type'] == undefined
    H.assetUrl source, options

for index, type of ['audio', 'font', 'image', 'video', 'javascript', 'stylesheet']
  helper (type+'Path'), assetPathBuilder(type)
  helper (type+'Url'),  assetUrlBuilder(type)

helper 'computeAssetPath', (source, options = {}) ->
  options['type'] ||= 'asset'

  if @forceAssetDomain
    options['domain'] ||= @domain[ options['type'] ]

  format = if options['format'] == undefined
    @defaultFormat[ options['type'] ]
  else
    options['format']

