Why is the speed of oceanic waves not a constant like sound? I cant understand this, according to what I read here. The speed of a wave depends on its wavelength and its depth, through the relation
$$
v=\sqrt{\frac{g\lambda}{2\pi}\tanh\left(2\pi \frac d\lambda\right)},
$$
where $\lambda$ is the wavelength, $d$ is the water depth, and $g$ is the acceleration due to gravity.
Yet the speed of sound is constant at $343\:\rm m/s$.
But sound is a product of an oscillation that provokes the molecules of the medium (atmosphere) to move up and down. 
An oceanic wave is again the product of an oscillation that provokes the molecules of the medium (water/ocean) to move up and down.
Shouldn't both be constants just of a different value since water is a denser medium than air ? I can understand the reasoning of the one but when accepting it I can not understand why it does not apply to the other and vise versa :P I am really confused here... 
 A: Sound waves transfer energy to the molecules which energy moves , but the molecules stay put on an average position,
>A sound wave traveling through air is a classic example of a longitudinal wave. As a sound wave moves from the lips of a speaker to the ear of a listener, particles of air vibrate back and forth in the same direction and the opposite direction of energy transport. 
Italics mine.
There is  no collective  mass motion,only energy transport.

While waves that travel within the depths of the ocean are longitudinal waves, the waves that travel along the surface of the oceans are referred to as surface waves. A surface wave is a wave in which particles of the medium undergo a circular motion. Surface waves are neither longitudinal nor transverse. In longitudinal and transverse waves, all the particles in the entire bulk of the medium move in a parallel and a perpendicular direction (respectively) relative to the direction of energy transport. In a surface wave, it is only the particles at the surface of the medium that undergo the circular motion. The motion of particles tends to decrease as one proceeds further from the surface.

The formula incorporates this observation.
You must have noticed the curls in breaking ocean waves.
A: 
But sound is a product of an oscillation that provokes the molecules of the medium (atmosphere) to move up and down.

Sound waves in air are longitudinal waves. They compress and expand the air in the direction of propagation of the wave. The molecules don't go up and down, but forward and backward. You can have similar waves in water and their speed has the same property as the speed of sound in air. You can have variations in the propagation speed when the space through which the sound propagates gets very narrow, but in typical conditions, there is negligible dispersion.
The other answers provide information about the surface waves, which are longitudinal waves.
A: I think that this question is why sound waves are non-dispersive whereas gravity waves on the surface of water are and also depend on the depth of the water.  
In fact if the depth of the water is less than about half a wavelength, the speed of the gravity waves is $\sqrt{gd}$ and not dependent on the wavelength of the waves. The speed of gravity waves depending on the depth of the water is really no different than the speed of sound in air depending on the pressure, density etc.  
Also sound waves can show dispersion as is illustrated in the article about the dispersion in concrete.  

We find that at low  ultrasonic frequencies the  arrival velocity of
  ultrasonic pulse, in such a material, increases with the grain size.
  At the high ultrasonic frequencies a decrease of  the  pulse velocity
  with frequency and grain size is  observed.

In the chapter The Origin of the Refractive Index Feynman explains that electromagnetic waves interact with the bound electrons of a dielectric. The bound electrons undergo forced oscillations under the influence of the incoming electromagnetic waves.  If the frequency of the electromagnet wave is not close to that of a natural frequency of the material then the dispersion is very small but near resonance the material will be highly dispersive.  
So what you must look at is the interaction of the wave with the medium and its surroundings.  
In the link from HyoerPhysics that you quoted you will have noted that the motion of the gravity waves are as shown below.
 
If the depth of water is restricted (shallow water waves) then you can imagine that the speed of the waves might well be affected.  
This dependence of velocity on depth is explained in this poor video quality but excellent content Waves in Fluids which is one of a series of videos on fluid dynamics made by the National Committee for Fluid Mechanics Films.  
In deep water the gravity waves do become dispersive as the phase velocity is $\sqrt{\dfrac{g\lambda}{2 \pi}}$ which depends on the wavelength.
As is explained in the video gravity waves are the result in a difference in hydrostatic pressure which causes horizontal forces resulting in wave propagation.
I am afraid that I cannot simply explain by "hand waving" why it is that longer wavelength gravity waves travel faster than shorter wavelength waves which is shown in the Ripples in a Pond video in which capillary waves are also described.  
So perhaps the answer to your question is that when one starts to study wave motion the examples used tend to be relatively simple and dispersion tends not to be mentioned except in the splitting up of white light into its component colours by a prism.  More advanced courses then show that the assumptions made in the less advanced course are not necessarily valid.  
The book by Willard Bascom "Waves and Beaches" is available on free e-loan from Archive.org if you register with them.
A: The dynamical origins of the two are extremely different.


*

*Surface waves in water are gravity waves, which means that the restoring force trying to bring peaks and troughs back to the mean height is gravity. Peaks are higher than the surrounding water and tend to fall, while troughs are lower and tend to fill up with the water from the peaks on either side. (And, as with all oscillatory phenomena, the wave comes from an interplay between this restoring force and the inertia of the medium.) 

*Sound waves are pressure waves, which means that the restoring force is provided by the pressure in the medium. High-pressure pockets expand into their neighbours, while low-pressure pockets contract.


Since the dynamical origin is different, there is no reason to expect the speed of the two waves to have similar behaviour. 
