// <![CDATA[
   $(function() {   
   
      var theWindow        = $(window),
         $bg              = $("#backgound"),
         aspectRatio      = $bg.width() / $bg.height();
                           
      function resizeBg() {
         
         if ( (theWindow.width() / theWindow.height()) < aspectRatio ) {
            $bg
               .removeClass()
               .addClass('hauteur');
         } else {
            $bg
               .removeClass()
               .addClass('largeur');
         }
                  
      }
                           
      theWindow.resize(function() {
         resizeBg();
      }).trigger("resize");
   
   });
// ]]>
