var xPos, yPos;
var xurl;
var cat_title,cat_url;
var allowed_link = new Array();
$(document).ready(function() {
	$('a').mouseover(function(evt) {
		  allowed_link[0]="http://www.hotfreebies4u.com/category/business-freebies/";
        allowed_link[1]="http://www.hotfreebies4u.com/category/computer-security/";
        allowed_link[2]="http://www.hotfreebies4u.com/category/cool-and-free/";
        allowed_link[3]="http://www.hotfreebies4u.com/category/free-asp-web-hosting/";
        allowed_link[4]="http://www.hotfreebies4u.com/category/free-calendars-and-task-management-utilities/";
        allowed_link[5]="http://www.hotfreebies4u.com/category/free-downloads/";
        allowed_link[6]="http://www.hotfreebies4u.com/category/free-office-software/";
        allowed_link[7]="http://www.hotfreebies4u.com/category/free-online-games/";
        allowed_link[8]="http://www.hotfreebies4u.com/category/free-online-tv/";
        allowed_link[9]="http://www.hotfreebies4u.com/category/free-photo-and-graphics/";
        allowed_link[10]="http://www.hotfreebies4u.com/category/free-photo-editing-tools/";
        allowed_link[11]="http://www.hotfreebies4u.com/category/free-php-web-hosting/";
        allowed_link[12]="http://www.hotfreebies4u.com/category/free-privacy-tools/";
        allowed_link[13]="http://www.hotfreebies4u.com/category/free-ringtones-sms/";
        allowed_link[14]="http://www.hotfreebies4u.com/category/free-seo-softwares/";
        allowed_link[15]="http://www.hotfreebies4u.com/category/free-software/";
        allowed_link[16]="http://www.hotfreebies4u.com/category/free-translation-tools/";
        allowed_link[17]="http://www.hotfreebies4u.com/category/free-webhosting-no-forced-ad/";
        allowed_link[18]="http://www.hotfreebies4u.com/category/free-webmaster-tools/";
        allowed_link[19]="http://www.hotfreebies4u.com/category/uncategorized/";
		xurl=this.href+'feed';
		cat_title=$(this).text();
		cat_url=this.href;
		//alert(xurl);
		xPos=evt.pageX;
		yPos=evt.pageY;
		
		for(var i=0;i<allowed_link.length;i++){
			if(cat_url==allowed_link[i]){
				$("#previewWin").empty();
		$('#previewWin').css({'top': yPos + 2 + 'px'});
		$('#previewWin').css({'left': xPos + 2 +'px'});
 		$("#previewWin").css({ 'visibility': 'visible'});
 		$("#previewWin").append('<center><img src="http://www.smart-voip-solution.com/wp-content/themes/c5/ajax_loader.gif"></center>');
			$.ajax({
     	    type: "GET",
            url: xurl,
        	dataType:"xml",
            success: parseXml
  		});
	}
 }
 function parseXml(xml){
 	
 	$("#previewWin").empty();
 	$("#previewWin").append('<b><b>'+'<div style="color:#0000FF">' + cat_title +'</div><br>');
 	$(xml).find("item").each(function() {
 	$("#previewWin").append('<a href="' + $(this).find("link").text() + '">' + $(this).find("title").text() + '</a>'+ '<hr>');
	});
	$("#previewWin").append('<a style="color:#0000FF" href="'+cat_url+'">View All </a>');
		$("#previewWin").mouseleave(function() {
		$("#previewWin").css({ 'visibility': 'hidden'});
 });
   
}  		
})});	
