$(document).ready(function(){

	$('a[@rel*=lightbox]').lightBox();


	/*
	$("#all_def").hide();
	$("#showLink").show();

	$("#toggleDiv").click(function () {
		$(".showHideLink").toggle();
		if ($("#all_def").is(":hidden")) {
			$("#all_def").slideDown("normal");
		} else {
			$("#all_def").slideUp("normal");
		}
	});
	*/




	$('ul.sf-menu').superfish();




});

/*  Tooltip script   */
 
this.tooltip = function(){	
	/* CONFIG */		
		xOffset = -20;
		yOffset = -50;		
		// these 2 variable determine popup's distance from the cursor
		// you might want to adjust to get the right result		
	/* END CONFIG */		
	$("a.tooltip").hover(function(e){											  
		this.t = this.title;
		this.title = "";									  
		$("body").append("<div id='tooltip'><p>"+ this.t +"</p></div>");
		$("#tooltip")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px")
			.fadeIn("fast");		
    },
	function(){
		this.title = this.t;		
		$("#tooltip").remove();
    });	
	$("a.tooltip").mousemove(function(e){
		$("#tooltip")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px");
	});			
};

function mycarousel_initCallback(carousel)
{
    // Disable autoscrolling if the user clicks the prev or next button.
    carousel.buttonNext.bind('click', function() {
        carousel.startAuto(0);
    });

    carousel.buttonPrev.bind('click', function() {
        carousel.startAuto(0);
    });

    // Pause autoscrolling if the user moves with the cursor over the clip.
    carousel.clip.hover(function() {
        carousel.stopAuto();
    }, function() {
        carousel.startAuto();
    });
};


// starting the script on page load
$(document).ready(function(){
	tooltip();
});