javascript function vs jquery namespace function, the difference?
<p>How come a javascript function like this below...</p>

<pre><code>function stars() {
var mOpacity = $('#area').css('opacity');
if (mOpacity = 1) {

$('#title').find('.stars').animate({"marginTop":"-170px",opacity:1}, 3000)
.animate({opacity: 0}, 400)
.animate({"marginTop":"60px",opacity:0},0, stars);
  }
}
stars();
</code></pre>

<p>...breaks my browser when I try to do something like this....</p>

<pre><code>$.stars = function() {
var mOpacity = $('#area').css('opacity');
if (mOpacity = 1) {

$('#title').find('.stars').animate({"marginTop":"-170px",opacity:1}, 3000)
.animate({opacity: 0}, 400)
.animate({"marginTop":"60px",opacity:0},0, $.stars());
  }
}
$.stars();
</code></pre>

<p>What is the lesson here between the 2 styles of functions?</p>

<p>Thanks</p>

<p><strong>Ok based on everyones feedback to see more code, here is a full gimplse of the code on my .js file...</strong></p>

<pre><code>function mIntro() {

/********PRE-GAME ANIMATION*********/
$('#area').css({'opacity':0}).delay(1000).animate({opacity:1},300);
$('#title').find('.age').css({'opacity':0}).delay(2000).animate({opacity:1}, 3000);

function stars() {
var mOpacity = $('#area').css('opacity');
if (mOpacity = 1) {

$('#title').find('.stars').animate({"marginTop":"-170px",opacity:1}, 3000)
.animate({opacity: 0}, 400)
.animate({"marginTop":"60px",opacity:0},0, stars);
  } 
}
stars();
}

$(function() {
  mIntro();
});
</code></pre>

<p>I have jquery connected to this .js page and I just can't understand why stars has to be in-cased in a traditional javascript function and not flexibile for a jquery namespace function.  I bet it has something to do with the animate tag that re-calls stars, but I am not sure...</p>

<p>Thanks or any advice!!!</p>
