$(document).ready(function(){
    var resumeItems = function(e) {
        $('#items').cycle('resume',true);
    }
     var resumeCenter = function(e) {

        $('#centerCycle').cycle('resume',true);
    } 

    $('#items').cycle({
        fx: 'fade',
        next: '.next',
        prev: '.prev',
        pause: 1,
        timeout: 3000
    });

    $('#items a[title].addTooltip').qtip({
        position: {
            target: $('#title'),
            type: 'absolute',
            container: $('#title'),
            corner: {
                target: 'topLeft',
                tooltip: 'topLeft'
            }
        },
        style: {
            padding: '0 0 0 10px',
            background: '#0d422d',
            color: 'white',
            textAlign: 'left',
            border: {
                width: 0
            },
            width: 286
        },
        show: {
        	delay: 0
        },
        api: {
            onHide: resumeItems
        }
    });   

    $('#centerCycle').cycle({
        fx: 'fade',
        pause: 1,
        timeout: 5000
    }); 
    
    $('#centerCycle a[title].addTooltip').qtip({
        position: {
            target: $('#centerCycle'),
            type: 'absolute',
            corner: {
                target: 'bottomLeft',
                tooltip: 'bottomLeft'
            }
        },
        style: {
            padding: '0 0 0 15px',
            background: '#a01d25',
            color: 'white',
            textAlign: 'left',
            border: {
                width: 0
            },
            width: 470
        },
        show: { 
            effect: 'slide',
            delay: 0
        },
        hide: {
        	delay: 3000
        },
        api: {
            onHide: resumeCenter
        }
    });      
    
});