       else elem.attr name
 
   # set element value or attrible
-  setValue = (elem, name, value) ->
+  setValue = app.setValue = (elem, name, value) ->
     switch name.toString().toLowerCase()
       when 'text' then elem.text value
       when 'html' then elem.html value

      when 'object' then value += JSON.stringify val
      else value += val.toString()
    env += "var #{key}=#{value};"
  return "(function(){#{env}(#{@toString()})()})();"

# Application script
application = ->
  # application object
  app = window.app = {}
  app.callers = {}
  app.model = {}

  # application events
  app.selector = window.selector = (selname) ->

            style = if template.attr 'style' then template.attr 'style' else ''
            root.children().attr 'style', style
          # remove actived item
          actived.remove() if (method is 'remove') and (actived.index() > -1)

  # getting user event
  window.constructor::__defineGetter__ 'event', ->
