/*
Custom scripts to be run on page load - for WFAD.se
Scripts should be placed inside the runCustom function
*/

jQuery.noConflict(); // Ensure that jQuery and MooTools can work side by side 

function runCustom(){
  // Print email address on first page
  var hostname = "wfad.se";
  document.getElementById('mcens').innerHTML = '| &nbsp;<a style="color: #fff;" href="mail'+'to:info'+'@'+hostname+'">info@'+hostname+'</a>';
}


// Mark ext. links with a symbol (unless the page instance is being automatically translated by Google)
function addExtLinkStyle(){ 
   if(window.location.host.indexOf("google") == -1){
    var link = document.createElement("link");
    link.type = "text/css";
    link.rel = "stylesheet";
    link.href = "/templates/rt_solarsentinel_j15/css/extlink.css";
    document.getElementsByTagName("head")[0].appendChild(link);

  }
}
addExtLinkStyle(); 
// Other layout fixes for Google Translate.

function prepForGT(){
   if(window.location.host.indexOf("google") != -1){
    var link = document.createElement("link");
    link.type = "text/css";
    link.rel = "stylesheet";
    link.href = "/templates/rt_solarsentinel_j15/css/gtfixes.css";
    document.getElementsByTagName("head")[0].appendChild(link);
    
  }
}
prepForGT();
// //
 
jQuery(document).ready(function(){
(function($) { 

/* INACTIVATED
// Fix menu layout style
function setTopmenuInitBg(){
  if($('ul#topmenu > li:first').attr('id') == "current"){
    $('ul#topmenu').css('background-image','url("/templates/rt_solarsentinel_j15/images/top-m-init-selected.png")');
  }
  else
  {
    $('ul#topmenu').css('background-image','url("/templates/rt_solarsentinel_j15/images/top-m-init.png")');
  }
}

$('ul#topmenu > li:first').bind('mouseover',function(){
   $(this).parent('ul').css('background-image','url("/templates/rt_solarsentinel_j15/images/top-m-init-selected.png")');
});

$('ul#topmenu > li:first').bind('mouseout',function(){
  setTopmenuInitBg();
});



setTopmenuInitBg();
// END

*/

})(jQuery);
});
