$(document).ready(function() {
   //inline text input label (searchbox)
   $("div.inline_label_wrapper").children("label").addClass("background");
   $("div.inline_label_wrapper").children("input[type=text]").each(function() {
    if($(this).val()!="") {$(this).siblings(".background").css({'text-indent':'-999em'}) };
   });
   $("div.inline_label_wrapper").children("input[type=text]").focus(function(){ $(this).siblings(".background").css({'text-indent':'-999em'});}).blur(
            function(){ if($(this).val()=="") {$(this).siblings(".background").css({'text-indent':'0'});}});
   
   //handle external links
   $("a[href*='http://']:not([href*='"+location.hostname+"']),[href*='https://']:not([href*='"+location.hostname+"'])").addClass("external")
   $("a.external").attr("target","_blank").attr("title","Öppnas i nytt fönster");
});
