function init(bgs){
    bindings(bgs);    
    execution(bgs);
}
function execution(bgs){
    bgs.each(function(index,value){
        bgs[index] = imgLocation + value;
    });
    bgIndex = getCurrentBackgroundIndex(bgs);
    $([$("#bg").attr("src")]).preload();
}
function bindings(bgs){
    $("#prev").click(function(){
        movePhoto(bgs, -1);
    });
    $("#next").click(function(){
        movePhoto(bgs, 1);
    });
    $(window).resize(function() {
        resizeBg();
    });
}
