       $a.click (e) ->
         href = $(this).attr('href')
         if href.match(/^#\w+/)
-          $activePage = $('.ui-page-active')
-          $page = $(href)
-          # got page
-          if $page.get(0)
-            $page.show().addClass('ui-page-active')
-            $activePage.hide().removeClass('ui-page-active')
+          uMobi.showPage(href)
   return uMobi

define ["depend!jquery.hashchange[jquery]"], ->
  uMobi =
    Env: { }

  # uMobi
  uMobi.initPageContainer = (el) ->

    $h.addClass('ui-fixed-hd') if $h.data 'fixed'
    $f.addClass('ui-fixed-ft') if $f.data 'fixed'


  # Page Initialization
  $ ->
    $(window).on 'hashchange', (e) ->
      uMobi.handleHashChange(e)

    $(document).trigger('pageinit')

    # find static pages and initialize them
