Javascript will not run properly

As for me, in WP I always use jQuery instead noConflict mode,
Try to run this code: http://jsfiddle.net/GKmvA/1/