/**
  Protect The Human Blog: Utilities
  Author: Oli Matthews
  http://www.madebymany.co.uk
**/
// On DOM Ready
jQuery(document).ready(function($){
  
  // Replace Search form label
  var labelText = $('#searchForm #searchsubmit').val();
  if ($('#searchForm #s').val() == '') {
    $('#searchForm #s').val(labelText);
  };
  $('#searchForm #s').focus(function(){
    if ($('#searchForm #s').val() == labelText) {
      $(this).val('');
      $(this).blur(function(){
        if ($(this).val()=='') {
          $('#searchForm #s').val(labelText);
        };
      });
    };
  });
  
  var networkLinks = $('#network .linkcat UL LI A');
  networkLinks.each(function(){
    if ($(this).attr('href') == blogUrl) {
      $(this).addClass('active');
    }
  });
  
  $('.js_link_parent').linkParent();
});

jQuery.fn.linkParent = function(){
 jQuery(this).each(function(e){
 var href = jQuery(this).find('a').attr('href');
 jQuery(this).click(function(){document.location.href = href});
 });
}
