$(document).ready(function(){
 		 $(".tooltipsleft").hover(
			function() { $(this).contents("div:last-child").css({ display: "block" }); },
			function() { $(this).contents("div:last-child").css({ display: "none" }); }
		);

		$(".tooltipsleft").mousemove(function(e) {
			var mousex = e.pageX + 10;
			var mousey = e.pageY + 5;
			$(this).contents("div:last-child").css({  top: mousey, left: mousex });
		});
		$(".tooltipsright").hover(
			function() { $(this).contents("div:last-child").css({ display: "block" }); },
			function() { $(this).contents("div:last-child").css({ display: "none" }); }
		);

		$(".tooltipsright").mousemove(function(e) {
			var mousex = e.pageX - 15;
			var mousey = e.pageY + 5;
			$(this).contents("div:last-child").css({  top: mousey, left: (mousex - ($(this).contents("div:last-child").width()) ) });
		});
		
		$(".tooltipsbanner").hover(
			function() { $(this).contents("div:last-child").css({ display: "block" }); },
			function() { $(this).contents("div:last-child").css({ display: "none" }); }
		);

		$(".tooltipsbanner").mousemove(function(e) {
			var mousex = e.pageX;
			var mousey = e.pageY - 5;
			$(this).contents("div:last-child").css({  left: mousey, top: mousey });
		});
		
		var c = window.location.href;	
		var clickurl = "http://digitaltransactions.net/index.php/clicks";
		$(".sponsor").click(function(e){
		     e.preventDefault();
		     var href = $(this).attr("href");
		     var a = $(this).attr("id");
		     var p = $(this).attr("rel");
		     var data = {'a':a, 'c':c, 'href':href, 'p':p};
		     //var data = "a="+a+"&c="+c+"&href="+href;
		     window.open(href);
		     var l = $.ajax({type:"POST", url: clickurl, async: false, data:data}).responseText;
		     //window.location = href;	
		     
		    }
		)
		
		
 });
