

$(document).ready(function() {

$("#references").click(function (){
   traceEvent(0,'reference',29);
		    if ($("#reference_container").is(":visible")){$("#reference_container").hide();$("#reference").html("[+]");} else {$("#reference_container").show();$("#reference").html("[-]");}
   				  });	
enableRefLink();

   $(".tb_link").click(function(){
	        if (!$(this).hasClass("selectedTabEffect")){
		        $(".tb_link").removeClass("selectedTabEffect");
		        $(this).addClass("selectedTabEffect");
		        $(".tb_panel").removeClass("panelBodySelected");
		        $(".tb_panel").hide();
		        var panel =  $('#' + $(this).attr("id") + 'Panel').show().addClass("panelBodySelected");
		        return false;
	        };
        })

});

function enableRefLink(){	
$(".ref_link").unbind();
$(".ref_link").bind("click",function () {$("#reference_container").show();$("#reference").html("[-]");});
	

$(".ref_link").hover(
      function () {
     
		var content= $("#ref_"+ $(this).html().replace("(","").replace(")","").replace("[","").replace("]","")).html();
$(".contentContainer").append("<div id='reference_layer'><strong>"+ $(this).html() + '.</strong> '  +content + "</div><div id='reference_layer_shadow' style='filter:alpha(opacity=50);-moz-opacity: 0.5;opacity: 0.5; display:none;'></div>");
		var position = {};
$(this).position(position);

position.top=position.top -  $('#reference_layer').height() - $(this).height() -14;
position.left=position.left - $('#reference_layer').width()	-22;

$('#reference_layer').css(position);
position.top=position.top + 7;
position.left=position.left  + 5;

$('#reference_layer_shadow').css(position);
$("#reference_layer_shadow").fadeIn();
$("#reference_layer").fadeIn();
$("#reference_layer_shadow").css("height", $("#reference_layer").height() + 'px');
	
		}, 
      function () {
	$("#reference_layer_shadow").fadeOut(); $("#reference_layer").fadeOut(); $("#reference_layer").remove(); $("#reference_layer_shadow").remove();
	   
      }
    );


}

function exit(){

$("#flashLayer").hide();
$("#Box01Home_body").fadeIn();

}
	
	

