/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

var MARK_SITE = {
    toggleSection: function( clickItem ){
        $('#expertDetailInfoNav .arrow a').removeClass('hideInfo');
        $('#expertDetailInfoNav .arrow span').addClass('hideInfo');
        $('#expertDetailInfoNav .arrow').removeClass('arrow');
        $('.expertDetailInfoList').addClass('hideInfo');
        $(clickItem).addClass('hideInfo');
        $(clickItem).siblings().removeClass('hideInfo');
        $(clickItem).parent().addClass('arrow');
        showDiv = $(clickItem).attr('href');
        $(showDiv).removeClass('hideInfo');
    },
    printWindow: function(){
        window.print();
    }
};

//Actually do it
$(document).ready(function(){
    //Expert - change sections
    $('#expertDetailInfoNav li a').bind('click', function(){
        MARK_SITE.toggleSection( this );
        return false;
    }
    );

    //Show print dialog box
    $('#printWindow').bind('click',function(){
        MARK_SITE.printWindow();
        return false;
    });

	$('a.external').click(function(){
		pageTracker._trackEvent('outbound', $(this).attr('href'), document.location);
		pageTracker._trackPageview('/outbound/' + $(this).attr('href') + '/' + document.location); //logical groups the links
	});
});
