console.log('scripts loaded');
document.onreadystatechange = function(event) {
    if (document.readyState === "complete") {
        console.log('document loaded');
        document.addEventListener("click",function (event) {
            console.log(event.target);
            curpos=1;
            if(document.getElementById("top-slider").getAttribute("data-position"))
            {
                curpos = document.getElementById("top-slider").getAttribute("data-position");
            }
            nextposition = get_next_pos(curpos);
            prevposition = get_prev_pos(curpos);
            /*
            if(event.target.matches('.prev'))
            {
                document.getElementById("slider").setAttribute("data-position",$prevposition);
            }
            if(event.target.matches('.pause'))
            {
                document.getElementById("slider").setAttribute("data-paused","true");
            }
            if(event.target.matches('.next'))
            {
                document.getElementById("slider").setAttribute("data-position",$nextposition);
            }
            */
        });
    }
}

function get_next_pos()
{

}

function get_prev_pos()
{
    
}