$(document).ready(function() {
    anchor.init();
});

anchor = {

    move : function(elementClick) {
        destination = $(elementClick).offset().top;
        $("html:not(:animated),body:not(:animated)").animate({
            scrollTop: destination
        }, 1100 );
    },

    init : function()  {
        $("a.arriba").click(function () {
            var href = $(this).attr("href");
            anchor.move(href);
            if(typeof ClickTale=='function') ClickTaleExec("anchor.move('" + href + "')");
            return false;
        })
        $("a.btn-mas-info").click(function () {
            var href = $(this).attr("href");
            anchor.move(href);
            if(typeof ClickTale=='function') ClickTaleExec("anchor.move('" + href + "')");
            return false;
        })
        /*$("a.add").click(function () {
            elementClick = $("#bd");
            destination = $(elementClick).offset().top;
            $("html:not(:animated),body:not(:animated)").animate({
                scrollTop: destination
            }, 1100 );
            return true;
        })

        $("div.cont-btn a.add2").click(function () {
            elementClick = $("#bd");
            destination = $(elementClick).offset().top;
            $("html:not(:animated),body:not(:animated)").animate({
                scrollTop: destination
            }, 1100 );
            return true;
        })*/
    }
}
