//Use jQuery(document).ready(function($){}); to avoid such conflicts or errors
jQuery(document).ready(function($){
    //add respective id to the menu list
    $('#menu li').each(function(){
        $title = $(this).find('a').attr('title').toLowerCase(),
        $(this).attr('id', $title)
    });
        
    $('#stage .inner').innerfade({
        speed: 'slow',
        timeout: '8000'
    });
    
    $('.slidevideos').jCarouselLite({
        auto: 10000,
        speed: 200,
        btnNext: '.next',
        btnPrev: '.prev'
    });
    
    $('h1.title').attr('class', 'imgHeading');
    $('.tooltip').tipsy({
        gravity: 'n'
    });
    
    $('.wpcf7-form').validate();
    $('#optinform form').validate({
        rules: {
            wpnewsletter_email : { required: true , email: true }
        }
    });
    
    $('#newsletter').mousedown(
        function(){
            $(this).colorbox({
                href: 'http://foulplay.com/subscription/',
                iframe: true,
                height: '60%',
                width: '50%'
            });
        });

});
