// <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script>
// <script type="text/javascript">jQuery.noConflict();</script>
// <script type="text/javascript" src="http://slashnow.com/static/snbar.js"></script>

jQuery(document).ready(function($) {  
  var styles = '<style type="text/css">' + 
    "#network_bar                 {float:left; display:inline; width:100%; margin:0; padding:0; background:#222; color:#ccc;}" + 
    "#network_bar h1              {float:left; font-size: 12px; line-height:26px; width: 162px; height: 26px; }" +
    "#network_bar h1 a            {float:left; text-indent:-9999px; font:12px/12px helvetica, arial, sans-serif !important; width: 162px; height: 26px; background:url(http://slashnow.com/static/snbarlogo.PNG) no-repeat 0 50%;} " +
    "#network_bar ul              {float:left; display:inline; margin:0; padding:0;}" + 
    "#network_bar ul li           {float:left; display:inline; margin:0; padding:0; border-right:1px solid #333; list-style-type:none;}" + 
    "#network_bar ul li a         {float:left; display:block; margin:0; padding:6px 10px; color:#aaa; font:12px/12px helvetica, arial, sans-serif !important; text-decoration:none; text-align:center;}" + 
    "#network_bar ul li a:hover   {color:#fff; background:#222;}" + 
    "#network_bar ul li a.current {color:#fff;}" + 
  '</style>';
  
  var html = '<div id="network_bar">' + 
    '<h1>' +
    '<a href="http://slashnow.com">SlashNow</a>' +
    '</h1>' +
    '<ul>' +
        '<li><a href="http://blog.slashnow.com" title="Development Blog of SlashNow">Blog</a></li>' +
        '<li><a href="http://tech.slashnow.com" title="Tech News by SlashNow">Tech</a></li>' +
        '<li><a href="http://gotd.slashnow.com" title="Girl of The Day">GoTD</a></li>' +
        '<li><a href="http://anime.slashnow.com" title="Anime by SlashNow">Anime</a></li>' +

    '</ul>' +
  '</div>';
  
  $('head').append(styles);
  $('body').prepend(html);
  
  // to ensure that there is clearage after network bar
  $('#network_bar').next().css({clear: 'both'});
    
  $('#network_bar a').each(function() {
    var link = $(this);
    var is_current = new RegExp(link.attr('href')).match(window.location.href);
    if (is_current) {
      link.addClass('current');
    }
  });
});