/**
 * Created by IOAN on 11/26/2015.
 */
$(document).ready(function(){

    var click_links = click_count_paths;
    $('.click-link').each(function(){
        var click_link_id = $(this).attr('rel');
        var extra_class = $(this).attr('extra_class');
        var sub_content = '<a href="' + click_links[click_link_id] + '" class="' + extra_class + '" target="_blank">' + $(this).html() + '</a>';
        $(this).replaceWith(sub_content);
    });

    $('.adv_linkage').each(function(){
        var $lnk = $(this);
        $lnk.click(function(ev){
            ev.preventDefault();
            window.open($lnk.attr('link'));
            return false;
        });
    });
});