function initTabs(){
    var $tabs = $("#jtabs > ul").tabs({ fx: {
      opacity: 'toggle',
      duration: 'fast'
      }
    });
    //dynamic tracking script
    $("#jtabs > ul li a").click(function(){
        var href = this.href;
        pageTracker._trackPageview(href.replace(/#/,"/"));
    });
    
    
    $('.link_home').click(function() { // bind click event to link
        $tabs.tabs('select', '#home'); // switch to second tab
        $.scrollTo( '#content_body', 500, { easing:'swing', queue:true, axis:'xy' } );
        return false;
    });
    $('.link_stores').click(function() { // bind click event to link
        $tabs.tabs('select', '#stores'); // switch to second tab
        $.scrollTo( '#content_body', 500, { easing:'swing', queue:true, axis:'xy' } );
        return false;
    });
    $('.link_multi-channel').click(function() { // bind click event to link
        $tabs.tabs('select', '#multi-channel'); // switch to second tab
        $.scrollTo( '#content_body', 500, { easing:'swing', queue:true, axis:'xy' } );
        return false;
    });
    $('.link_features').click(function() { // bind click event to link
        $tabs.tabs('select', '#features'); // switch to second tab
        $.scrollTo( '#content_body', 500, { easing:'swing', queue:true, axis:'xy' } );
        return false;
    });

    if(query_arr[0]){
        $tabs.tabs('select', '#'+query_arr[0]);
    }
}

$(document).ready(function(){
    initTabs();
});
