jQuery(document).ready(function() {
    anchor.init()
});

anchor = {
    init : function() {
        jQuery("a.anchorlink").click(function () {
            elementClick = jQuery(this).attr("href");
            var aux_element = elementClick.split("#");
            if(aux_element[0].length != 0){
                elementClick = "#" + aux_element[1];
            }
            destination = jQuery(elementClick).offset().top;
            jQuery("html:not(:animated),body:not(:animated)").animate({
                scrollTop: destination
            }, 1100 );
            return false;
        })
    }
}

