/**
 * @author Cedric.Lemius
 */

$(document).ready(function() {
  /* $('#recherche > input.search').focus(function() {
		$(this).toggleClass("focus");
   });
   
   $('#recherche > input.search').blur(function() {
		$(this).toggleClass("focus");
   });
   */
   $("#searchsubmit").bind('click', function() {
		var url = "http://www3.chu-rouen.fr/internet/moteur_recherche/Recherche.htm?cx=016307671162894157960%3A7nxwdod22qy&q=";
		url = url + $("input.search").val();
		url = url + "&sa=Rechercher&cof=FORID%3A11&ie=ISO-8859-1&oe=ISO-8859-1#914";
		$(this).attr("href", url);
	});
	$("#cismefsubmit").bind('click', function() {
		var url = "http://doccismef.chu-rouen.fr/servlets/Simple?Mot=";
		url = url + $("#cismef > input.search").val();
		$(this).attr("href", url);
	});
	$("#menu li").hover(
      function () {
        $(this).addClass("hover_lien");
      }, 
      function () {
        $(this).removeClass("hover_lien");
      }
    );
    
    $("#facebook").hover(
		function(){
			$(this).find('img').attr('src', '/internet/ressources/images/facebook_hover.jpg');
		},
		function(){			
			$(this).find('img').attr('src', '/internet/ressources/images/facebook.jpg');
		}
	);
});
