function getParameterByName( name ) {
  name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");

  var regexS = "[\\?&]"+name+"=([^&#]*)";
  var regex = new RegExp( regexS );
  var results = regex.exec( window.location.href );

  if( results == null )
    return "";
  else
    return results[1];
}

$(document).ready(function () {
  $('#logo').css('cursor', 'pointer');
  $('#logo').bind("click", function(e) {
    window.location = "/Default.html";
  });

  $('#gateways > ul').setupTreeNavigation();
  $('#destinations > ul').setupTreeNavigation();

  $('#q').click(function (e) {
    if (this.value == "Search...") { this.value=""; }
  });

  // $(document).pngFix();  

  //$().setup_billboard();

  if ($("a[href$='swf']") == Array()) {
    Shadowbox.init({
      players:   ["img","swf","flv","wmp","html"]
    });
  }

  $("a[href$='swf']").attr('rel', 'shadowbox;width=640;height=480');
});
