var featuredArtistSelected=0;
currentVideo = 0;
popularVideo = 0;
currentAllVideo = 0;
var lockVideo = false;
var lockPopular = false;
var lockAllVideo = false;
$(window).load(function(){
   init();
});
function init(){
    $(".carouselContent").jCarouselLite({
        btnNext: ".allVideoButtonLeft",
        btnPrev: ".allVideoButtonRight",
        mouseWheel: 'true',
        circular: 'true',
        visible: 4,
        scroll:4,
        speed:1500
    });
    $("#carouselPreloader").hide();
}

function selectVideo(id){
    if(id != currentVideo && !lockVideo){
        lockVideo = true;
        var top = 820 + (114*id);
        $("#selectionArrow1").animate({
            top: top
        },1000);
        $("#player_" + currentVideo).fadeOut(1000, function(){
           $("#player_" + id).fadeIn(1000, function(){
               lockVideo = false;
           });
        });
        currentVideo = id;
    }
}

function selectAllVideo(id){
    if(id != currentAllVideo && !lockAllVideo){
        lockAllVideo = true;
        $("#allVideosPlayer_" + currentAllVideo).fadeOut(1000, function(){
           $("#allVideosPlayer_" + id).fadeIn(1000, function(){
               lockAllVideo = false;
           });
        });
        currentAllVideo = id;
    }
}


function selectPopular(id){
    if(id != popularVideo && !lockPopular){
        lockPopular = true;
        var top = 1335 + (114*id);
        $("#selectionArrow2").animate({
            top: top
        },1000);
        $("#popularPlayer_" + popularVideo).fadeOut(1000, function(){
           $("#popularPlayer_" + id).fadeIn(1000, function(){
               lockPopular = false;
           });
        });
        popularVideo = id;
    }
}

