
var sosn = {
    LoadVideoBar : function() {
        var vbr;
        var options = {
            string_allDone : "schliessen",
            largeResultSet : false,
            master : vbr,
            horizontal : true
    
        };
        vbr = new GSvideoBar(
            document.getElementById("youtubechannel"),            
            document.getElementById("youtubevideo"),
            options
        );   
        
        vbr.vs.setSearchCompleteCallback(this, sosn.onSearchComplete);
        vbr.execute("ytchannel:soskinderdorf"); 
        vbr.playVideo({
            playUrl: 'http://www.youtube.com/v/'+initialVideo.id,
            url: 'http://www.youtube.com/watch?v='+initialVideo.id,
            title: initialVideo.title
        })
    },
    
    
    onSearchComplete : function(sc, searcher) {
        alert(1);
        if ( searcher.results && searcher.results.length > 0) {
            $('#youtubevideo .idle_gsvb').html('sdasdfas');
        }
    }
}

$(document).ready(function() {

    // initialize scrollable
    $(".scrollable-news").scrollable({ 
        onSeek: function()  {  
            $("#current-news").html(this.getIndex()+1); 
        } 
    });
    $(".scrollable-press").scrollable({ 
        vertical: true, 
        mousewheel: true,
        onSeek: function()  {  
            $("#current-press").html(this.getIndex()+1); 
        } 
    });
    
    if($('#youtubevideo').length > 0) {
        GSearch.setOnLoadCallback(sosn.LoadVideoBar);
    }
    
});

$('html').addClass('js-on')


