﻿window.scrollTo(0, 0);
$(document).ready(function() {
    $.localScroll.hash({
        axis: 'x'
    });
    $('#container').localScroll({
        axis: 'x',
        hash: true
    });
});

function AbrirGrayBox(link, posicao) {
    GB_myShow('', link);
    Alterar(posicao);
}
function AbrirGrayBoxLink(link, posicao) {
    retorno = GB_myShow('', link);
    Alterar(posicao);
    return retorno;
}
GB_myShow = function(caption, url, /* optional */height, width, callback_fn) {
    var options = {
        caption: caption,
        height: height || 520,
        width: width || 860,
        fullscreen: false,
        show_loading: false,
        callback_fn: callback_fn
    }
    var win = new GB_Window(options);
    return win.show(url);
}

function Alterar(posicao) {
    document.getElementById("GB_overlay").style.left = posicao + "px";
    document.getElementById("GB_window").style.margin = "15px 0 0 " + posicao + "px";
}
