$(document).ready(function(){
    $('div.menu-background').mouseover(function() {
        var currentId = $(this).attr('id');
        $(this).toggleClass(currentId);
    });
    $('div.menu-background').mouseout(function() {
        var currentId = $(this).attr('id');
        $(this).toggleClass(currentId);
    });
    /*
    $('#countdown_dashboard').countDown({
        targetDate: {
            'day':      27,
            'month':    11,
            'year':     2011,
            'hour':     11,
            'min':      0,
            'sec':      0
        },
        omitWeeks: true
    });
    */
    /* text: $(this).find('.qtooltip-container').html() */

    $('.mininfo').live('mouseover', function() {
        $(this).qtip({
          overwrite: false, // Make sure another tooltip can't overwrite this one without it being explicitly destroyed
          content: {
            text: $(this).find('.qtooltip-container').html()
          },
          show: {
             ready: true
          },
          position: {
               my: 'bottom left', // Use the corner...
               at: 'top center' // ...and opposite corner
          },
          style: {
               classes: 'ui-tooltip-shadow ui-tooltip-youtube'
          }
        });
    });
    
    imgpreloader();
    function imgpreloader() {

         // counter
         var i = 0;

         // create object
         imageObj = new Image();

         // set image list
         images = new Array();
         images[0] = "/projectSetup/images/blue-btn-background-hover.png";
         images[1] = "/projectSetup/images/orange-btn-background-hover.png";

         // start preloading
         for(i=0; i<2; i++) {
              imageObj.src=images[i];
         }

    }
});


