function onYouTubePlayerReady(playerId) {
    $('.items').find('#' + playerId).each(function() {
        $(this)[0].addEventListener("onStateChange", "onytplayerStateChange");
    });
}

function onytplayerStateChange(state) {
    if (state == 1) {
        $("#browsable").data('scrollable').stop();
        $('#browsable').data('scrollable').autoplay = false;
    }
    if (state == 0) {
        $('#browsable').data('scrollable').autoplay = true;
        $("#browsable").data('scrollable').play();
    }
}
