document.observe('dom:loaded', function(e) {
  var bb = $('bb');
  if (bb) {
    new Ajax.Request('flash/billboard/billboard-content.xml',
      {
        method:'get',
        onSuccess: function(transport){
          var response = transport.responseXML;
          var titles = response.getElementsByTagName('title');
          var teasers = response.getElementsByTagName('teaser');
          var urls = response.getElementsByTagName('url');
          var cont = "";
          for (var i=0; i < titles.length; i++) {
            cont += '<h4>'+titles[i].firstChild.nodeValue+'</h4><a href="'+urls[i].firstChild.nodeValue+'">'+teasers[i].firstChild.nodeValue+'</a>';
          };
          bb.insert({bottom:cont})
        }
        //onFailure: function(){ alert('Something went wrong...') }
      });
    new Ajax.Request('flash/photo-tabs/photo-tabs.xml',
      {
        method:'get',
        onSuccess: function(transport){
          var response = transport.responseXML;
          var teasers = response.getElementsByTagName('txt');
          var urls = response.getElementsByTagName('url');
          var cont = "<ul>";
          for (var i=0; i < teasers.length; i++) {
            cont += '<li><a href="'+urls[i].firstChild.nodeValue+'">'+teasers[i].firstChild.nodeValue+'</a></li>';
          };
          cont += "</ul>";
          bb.insert({bottom:cont})
        }
        //onFailure: function(){ alert('Something went wrong...') }
      });
    new Ajax.Request('flash/online-services/online-services.xml',
      {
        method:'get',
        onSuccess: function(transport){
          var response = transport.responseXML;
          var titles = response.getElementsByTagName('title');
          var teasers = response.getElementsByTagName('txt');
          var urls = response.getElementsByTagName('url');
          var cont = "<ul>";
          for (var i=0; i < titles.length; i++) {
            cont += '<li><a href="'+urls[i].firstChild.nodeValue+'">'+titles[i].firstChild.nodeValue+'</a> - '+teasers[i].firstChild.nodeValue+'</li>';
          };
          cont += "</ul>";
          bb.insert({bottom:cont})
        }
        //onFailure: function(){ alert('Something went wrong...') }
      });
  };
})
