jQuery(document).ready(function($) {
  
  $("#search").focus(function() {
    $(this).addClass("active");
    $(this).css('text-indent','30px');
  });
  
  $("#search").blur(function() {
    $(this).removeClass("active");
    $(this).css('text-indent','30px');
  });
  
  var pams = $('a',$("#nav,.foot,h2,h3,h4"));
  
  pams.each(function(index) {
    var new_text = $(this).text().replace("pam", "<strong>pam</strong>");
    $(this).html(new_text);
  });
  
  
  $("a[href]",$('dd.filelinks')).each(function(){
    var url = $(this).text();
    var extension = url.substr( (url.lastIndexOf('.') +1) );
    $(this).parent('div').addClass(extension);
  });
    
});

shuffle = function(v){
    for(var j, x, i = v.length; i; j = parseInt(Math.random() * i), x = v[--i], v[i] = v[j], v[j] = x);
    return v;
};

