$(document).ready(function () {
  function sticky_footer() {
    var footer_height = $('#footer_wrapper').height();
    var content_height = $('#content').height();
    var win_height = $(window).height();
    var doc_height = $(document).height();
    var current_page_height = $('html').height();
    var footer_top = win_height - footer_height;
    if (win_height > current_page_height) {
      if ($.browser.webkit) {
      
      }
      $('#footer_wrapper').css({'position': 'absolute', 'top': footer_top, 'width': '100%'});
    }
    /* if (doc_height > win_height) {
      $('.ui-page-active #footer').css('top', footer_top_two);
    } 
    if (win_height >= doc_height) {
      $('.ui-page-active #footer').css({'position': 'absolute', 'top': footer_top});
    } */
    /* alert('page height: ' + current_page_height + 'win height: ' + win_height + 'doc height: ' + doc_height); */
  }

  sticky_footer();

  /* $('a').click(function() {
    sticky_footer();
    
  }); 

   $(window).resize(function() {
    sticky_footer();
  }); */
});

