why is this jQuery not working?
<p>I'm having this jQuery script thats adding a timer when someone voted he needs to wait 3 minutes </p>

<p>the script is working till the moment I'm getting the remaining time with php  </p>

<pre><code>$(document).ready(function(){
alert("1");
 function Timer(dur, par, can, cnt) {
var parent = $(par),
    canvas = can ? $(can, parent)[0] : $('.timer', parent)[0],
    seconds = cnt ? $(cnt, parent)[0] : $('.counter', parent)[0],
    sec = dur,
    countdown = sec;    

if (!canvas)
    canvas = $("&lt;canvas&gt;").addClass('timer')
        .attr('width', 100).attr('height', 100).appendTo(parent)[0];

if (!seconds)
    seconds = $("&lt;span&gt;").addClass('counter').appendTo(parent)[0];

var ctx = canvas.getContext('2d');
ctx.lineWidth = 8;
ctx.strokeStyle = "#528f20";

var startAngle = 0,
    time = 0,
    intv = setInterval(function() {
        var endAngle = (Math.PI * time * 2 / sec);
        ctx.arc(65, 35, 30, startAngle, endAngle, false);
        ctx.clearRect(0, 0, 200, 200);

        startAngle = endAngle;
        ctx.stroke();

        countdown--;
        if (countdown &gt; 60) {
            seconds.innerHTML = Math.floor(countdown / 60);
            var ss = countdown % 60;
            if (ss &lt; 10) 
                ss = "0" + ss;
            seconds.innerHTML += ":" + ss;
        }
        else {
            seconds.innerHTML = countdown;
        }

        if (++time &gt; sec, countdown == 0) {
            clearInterval(intv);
            $(canvas).remove();
            $(seconds).remove();
            /*$(par).prepend('&lt;img id="theImg" src="http://ivojonkers.com/votify/upvote.png" /&gt;');*/
        }
    }, 1000);}



$(".upvote").click(function(){
    alert("2");
    var par = $("&lt;div&gt;").addClass("time").appendTo("#timers");
    Timer(Math.round(180), par);
});
if (&lt;?php echo $wait; ?&gt; &gt; 0) {
var par = $("&lt;div&gt;").addClass("time").appendTo("#timers");
Timer(Math.round(&lt;?php echo $wait; ?&gt;, par); } });
</code></pre>

<p>so in this part I'm getting the time to wait for the next vote with php and this does not seem to work what's going wrong  ?</p>

<pre><code>if (&lt;?php echo $wait; ?&gt; &gt; 0) {
var par = $("&lt;div&gt;").addClass("time").appendTo("#timers");
Timer(Math.round(&lt;?php echo $wait; ?&gt;, par); } });
</code></pre>
