
function mycarousel_initCallback(carousel) {
    // Disable autoscrolling if the user clicks the prev or next button.
    carousel.buttonNext.bind('click', function () {
        carousel.startAuto(0);
    });

    carousel.buttonPrev.bind('click', function () {
        carousel.startAuto(0);
    });

    // Pause autoscrolling if the user moves with the cursor over the clip.
    carousel.clip.hover(function () {
        carousel.stopAuto();
    }, function () {
        carousel.startAuto();
    });
};

$(function () {

    /* ---- =CYCLE --*/

	$('#mycarousel').jcarousel({
		scroll:1,
		auto: 2,
        // wrap: 'last',
        initCallback: mycarousel_initCallback
		});

    $('#hero-sp')
	.after('<div class="cycle-nav cycle-nav-sp">')
	.cycle({
	    fx: 'fade',
	    speed: 500,
	    timeout: 8000,
	    pager: '.cycle-nav-sp',
	    pause: 1
	});

    $(".locationsPanelPic").hover(function (e) {

        $(this).hoverFlow(e.type,{
	        'margin-top': '-=75',
	        height: '+=150'
        },200);

	    $("img", this).hoverFlow(e.type, {
	        'margin-top': '+=15'
	    }, 200);

    },function (e) {

        $(this).hoverFlow(e.type, {
	        'margin-top': '+=75',
	        height: '-=150'
	    }, 200);

	    $("img", this).hoverFlow(e.type, {
	        'margin-top': '-=15'
	    }, 200);

    });

});
