    jQuery(document).ready(function() {
        jQuery('#mycarousel').jcarousel({
            start: 1
        });     
    });

$(document).ready(function (){
	$("div.article img[align=left]").addClass("img-space-right");
	$("div.article img[align=right]").addClass("img-space-left");

//	$("div.article img[style='float: left;']").addClass("img-space-right");
//	$("div.article img[style='float: right;']").addClass("img-space-left");



	$(".four-columns").mouseover(function(){$(this).css("background","#f3f7f7")});
	$(".four-columns").mouseout(function(){$(this).css("background","none")});


	$(".four-columns").click(function (){});
});





//-------------------===========================================================

/*
 * Tooltip script 
 * powered by jQuery (http://www.jquery.com)
 * 
 * written by Alen Grakalic (http://cssglobe.com)
 * 
 * for more info visit http://cssglobe.com/post/1695/easiest-tooltip-and-image-preview-using-jquery
 *
 */
 


this.tooltip2 = function(){	
	/* CONFIG */		
		xOffset = 30;
		yOffset = 30;		
		// 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("<p id='tooltip2'>"+ this.t +"</p>");
		$("#tooltip2")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px")
			.fadeIn("fast");		
    },
	function(){
		this.title = this.t;		
		$("#tooltip2").remove();
    });	
	$("a.tooltip").mousemove(function(e){
		$("#tooltip2")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px");
	});			
};



// starting the script on page load
$(document).ready(function(){
	tooltip2();
});

//-------------------===========================================================
	var __loaded = {};
	$(document).ready(function()
	{
		if ($("#content-sup .wrapper").get(0))
		{
		$(".tomain").tooltip({ 

			bodyHandler: function() {return $("<p></p>").html($("#content-sup .wrapper").html());},
			track: true, 
			delay: 200, 
			showURL: false, 
			opacity: 1, 
			fixPNG: true, 
///			showBody: " - ", 
			extraClass: "pretty fancy", 
			top: -15, 
			left: 5 
		});
		}

		$(".tooltip3").tooltip({ 

			bodyHandler: function() {
				var el = $(this).next().next();
				var img = "";
				if (el.attr("title"))
				{
					img = "<img src='"+ el.attr("title") +"' width=300>";
				}
				return $(img + el.html())},
			track: true, 
			delay: 200, 
			showURL: false, 
///			showBody: " - ", 
			extraClass: "tooltip_child", 
			top: -15, 
			left: 5 
		});

			
		$(".ajaxedtoolip").tooltip({ 
			bodyHandler: function() 
			{
				var link  = $(this).attr('link') ;
				if (! link )
					{return ;}
				if (__loaded[link])
					return 	__loaded[link];
	
				a = $("<div>... Loading ...</div>");
				__loaded[link] = a ;
				a.load(link);
				return a;
			},
//			track: false, 
			delay: 0, 
			showURL: false, 
			opacity: 0.5, 
			fixPNG: true, 
///			showBody: " - ", 
			extraClass: "custom article", 
			top: -20, 
			left: 20 
		});


	});
