$(document).ready(function(){ 
//  $('#login').html("<a id='login_link' href='#' onclick='loginBox();'>Existing users can login here</a>");
  
  
  $.getJSON("http://www.getmuffin.com/news.json",
          function(data){
            $.each(data.items, function(i,item){
              $('#news').html("<a href=" + item.link + ">" + item.news + "</a>" + " " + item.date);
              if ( i == 0 ) return false;
            });
          });


}); //This the end of doc.ready


// loginBox = function() {
//   var $login_form = "<form action='http://muffinapp.com/sessions/find_subdomain' method='post'><label for='email_address'>Enter your email address first</label><input id='email_address' name='email_address' type='text' />&nbsp;<input name='commit' type='submit' value='Go' /></form>";
//   $('#login').html($login_form);
//   $('#email_address').focus();
// };


