$(document).ready(function()
{
	$("#advertisment img").css("marginLeft","-60px");

	$("#advertisment img").mouseenter(function()
	{
		$(this).animate({marginLeft: "0px"},"fast");
	});
	
	$("#advertisment img").mouseleave(function()
	{
		$(this).animate({marginLeft: "-60px"},"fast");
	});
		
	$("a").click(function()
	{
	  trackclick(this.href, this.id, this.name);
	});	
	
	if ($(".slideshow").length) {  
    $(".slideshow").cycle({
		fx: "fade"
	});	
	};

	if ($(".slideshow1").length) {  
    $(".slideshow1").cycle({
		fx: "fade",
		timeout: 5000
	});	
	};
	
	if ($(".slideshow2").length) {  
    $(".slideshow2").cycle({
		fx: "fade",
		timeout: 5000
	});	
	};

	if ($(".slideshow3").length) {  
    $(".slideshow3").cycle({
		fx: "fade",
		timeout: 5000
	});	
	};

	if ($(".slideshow4").length) {  
    $(".slideshow4").cycle({
		fx: "fade",
		timeout: 5000	
	});	
	};
});

function trackclick(url, aid, atxt) {
 $.ajax({
   type: "GET",
   url: "/trackclick.php",
   data: "url="+url+"&aid="+aid+"&atxt="+atxt+"&loc="+window.location.href+"&screenwidth="+screen.width+"&screenheight="+screen.height,
   cache: false
 });
 return true;
}

