var imgCount = 0,
    ie = jQuery.browser.msie;
    ie6 = ie && parseInt(jQuery.browser.version, 10) == 6;

String.prototype.toValue = function()
{
	return Number(this.replace(/px/ig, ""));
};



jQuery(function()
       {
          if (!ie6)
          {
            window.setInterval(generateImage, 500);
            window.setInterval(grimReaper, 750);
          }  
          function generateImage()
          {
            if (imgCount < 20)
            {
              var randomId = Math.round(Math.random() * 3) + 1, 
                  image = new FadingImage({
                                             containerId : "title-wrapper",
                                             src : "/wp-content/themes/shinypixel-labs/assets/img/faders/" + randomId + ".png" 
                                          });
            }
          }          
          
          function grimReaper()
          {
            jQuery(".dead").remove();
          }
          
          jQuery("#commentform").css("opacity", "0.5").hover(function()
          {
              jQuery(this).stop(true, true).fadeTo(250, 1);
          },
          function()
          {
              jQuery(this).stop(true, true).fadeTo(250, 0.5);
          });
       });
       

