Cufon('h1', { color: '-linear-gradient(#f3cf00, #c27a26)' })
  ('h2', {hover:false, color: 'black'})
  ('h3', { color: '-linear-gradient(#f3cf00, #c27a26)'})
  ('h4', { color: '#fff'})
  ('h5', { hover: true, color: '#5ea340' })
  ('h6')
  ('#logo', { hover: true, textShadow: '1px 1px rgba(0, 0, 0, 0.5)' })
  ('div.frontHeader')('div.frontOverskrift')
('#navigation2 a',{hover: true})
  ('#mainNavigation a', { hover: true })
  ('#subNavigation a', { hover: true })
  ('#projektKompetancer a', { hover: true})
  ('#headerLogo a', { hover: true, color: 'white', textShadow: '1px 1px rgba(0, 0, 0, 0.5)' })
  ('#headerItems a', { hover: true, color: 'white', textShadow: '1px 1px rgba(0, 0, 0, 0.5)' })
('#contour label.fieldLabel', { color: '#4C7433'})
  ;


$(document).ready(function() {
    AEHit();
  
        //Caption Sliding (Partially Hidden to Visible)
        $('.boxgrid.caption').hover(function(){
          $(".cover", this).stop().animate({top:'0px'},{queue:false,duration:160});
        }, function() {
          $(".cover", this).stop().animate({top:'60px'},{queue:false,duration:160});
        });
  
    $('.boxgridStandard.caption').hover(function(){
          $(".coverStandard", this).stop().animate({top:'0px'},{queue:false,duration:160});
        }, function() {
          $(".coverStandard", this).stop().animate({top:'60px'},{queue:false,duration:160});
        });

});


function submitform() {
    document.getElementById('searchForm').submit();
}





function econvert(s) {
    if (null == s) return;
    s = s.replace(/%7E/g, '~').replace(/%28/g, '(').replace(/%29/g, ')').replace(/%23/g, '#');
    s = s.replace(/_dot_|_#dot#_| dot |_\._|\(\.\)|\+\.\+|\+dot\+|%20dot%20/gi, '.');
    return s.replace(/_at_|~at~|~#at#~|\(AT\)/gi, '@').replace(/%20/g, '');
}

function AEHit() {
    var r = new RegExp(/\baeh\b/);
    var as = document.getElementsByTagName("a");
    for (var i = 0, len = as.length; i < len; i++)
        if (r.test(as[i].className)) {
        as[i].firstChild.nodeValue = econvert(as[i].firstChild.nodeValue);
        as[i].href = econvert(as[i].href);
    }
}

