title: function inside document.ready won't work
body: <p>I have the following function:</p>
  
  <pre><code>$(document).ready(function(){
   function fav(type){
      switch(type){
          case "radius":if(radius_fav.indexOf(rad)== -1){
                          radius_fav.push(rad);
                           }
                           break;
          case  "transform":if(transform_fav.indexOf(final_transformation) == -1){transform_fav.push(final_transformation);}
                              break;
          default:if(bshadow !== none &amp;&amp; box_fav.indexOf(bshadow) == -1){box_fav.push(bshadow);}  
                          break;                              
      }
      }//end of switch statement
  
  
  });
  </code></pre>
  
  <p>Inside $(document).ready().This function won't work unless it is put outside document.ready().Any ideas?Jquery tag in html page is included
  CONSOLE:
   Uncaught ReferenceError: fav is not defined</p>