//NOTE FROM THE MOLITOR: "$" was replaced with "jQuery" to accomodate other libraries using the jQuery no conflict function. To reverse/remove this, simply replace every instance of "jQuery" with "$" and remove all instances of "jQuery.noConflict();". That's it ;-) ----------------------

/* Tooltip from CSS Globe written by Alen Grakalic (http://cssglobe.com)----------  */
this.tooltip = function(){	
	/* CONFIG */		
		xOffset = 0;
		yOffset = 10;		
		// these 2 variable determine popup's distance from the cursor
		// you might want to adjust to get the right result		
	/* END CONFIG */		
	jQuery.noConflict();
  jQuery("a.tooltip").hover(function(e){											  
		this.t = this.title;
		this.title = "";									  
		jQuery("body").append("<p class='itooltip'>"+ this.t +"</p>");
		jQuery(".itooltip")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px")
			.fadeIn(300);		
    },
	function(){
		this.title = this.t;		
		jQuery(".itooltip").remove();
    });	
	jQuery("a.tooltip").mousemove(function(e){
		jQuery(".itooltip")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px");
	});			
};

jQuery.noConflict();
  jQuery(document).ready(function(){
	tooltip();
	
	jQuery("#sidebar .widget h2").css("cursor","pointer");
	jQuery("#sidebar .widget:nth-child(1)").children(".widgetcontent").slideDown("slow");
    jQuery("#sidebar .widget h2").click(function () {
    	jQuery(this).siblings(".widgetcontent").slideToggle("slow");
    	jQuery(this).parent().siblings(".widget").children(".widgetcontent").slideUp();
    });
    
    jQuery("#sidebar .widget h2").hover(function () {
    	jQuery(this).animate({paddingLeft : '25px'}, 500);
		}, function() {
		jQuery(this).animate({paddingLeft : '15px'}, 500);
    });
    
	jQuery("#dropmenu ul").css({display: "none"}); // Opera Fix
	jQuery("#dropmenu a").removeAttr("title");
	jQuery("#dropmenu li").hover(function(){
		jQuery(this).find('ul:first').css({visibility: "visible",display: "none"}).show("slow");
		jQuery(this).css({background: "#6a3b14"});
		},function(){
		jQuery(this).find('ul:first').css({visibility: "hidden"});
		jQuery(this).css({background: "none"});
	});

});