$.fn.slide = function() 
{
	if($("#thumbs ul.thumbs li").length > 0)
	{
		$('#thumbs ul.thumbs li').opacityrollover();
	}
	
	if($("div.scrollable").length > 0)
	{	
		$("div.scrollable").scrollable({size: 1, clickable: false});
		
		$("#nav-left").children(".disabled").css({backgroundPosition: "0 bottom", cursor:"default"});
		$("#nav-right").children(".disabled").css({backgroundPosition: "-90px bottom", cursor:"default"});
		
		$("span.nav").click(function() {
			if ($(".disabled").length > 0)
			{
				$("#nav-left").children(".disabled").css({backgroundPosition: "0 bottom", cursor:"default"});
				$("#nav-right").children(".disabled").css({backgroundPosition: "-90px bottom", cursor:"default"});
			}
			else
			{
				$("#nav-left").children(".left").css({backgroundPosition: "0 top", cursor:"pointer"});
				$("#nav-right").children(".right").css({backgroundPosition: "-90px top", cursor:"pointer"});
			}
		});
		
		$("#nav-left").mouseenter(function() {
			if ($("#nav-left .disabled").length == 0)
			{
				$("#nav-left").children(".left").css({backgroundPosition: "0 -298px", cursor:"pointer"});
			}
		});
		
		$("#nav-left").mouseout(function() {
			if ($("#nav-left .disabled").length == 0)
			{
				$("#nav-left").children(".left").css({backgroundPosition: "0 top", cursor:"pointer"});
			}
		});
		
		$("#nav-right").mouseenter(function() {
			if ($("#nav-right .disabled").length == 0)
			{
				$("#nav-right").children(".right").css({backgroundPosition: "-90px -298px", cursor:"pointer"});
			}
		});
		
		$("#nav-right").mouseout(function() {
			if ($("#nav-right .disabled").length == 0)
			{
				$("#nav-right").children(".right").css({backgroundPosition: "-90px top"});
			}
		});
	}
	
	if($(".listcat").length > 0)
	{
		$('.listcat').change(function() {
			
			$link = $(this).attr("value");
			
			window.location=($link);
		});
	}
	
	if($("#zoom").length > 0)
	{
		$(".items img[rel]").overlay({			
			top: 175,
			
			expose: 
			{		 
				color: '#000', 
				loadSpeed: 200, 
				opacity: 0.6 
			}
		});
	}
	
	if($(".plan").length > 0)
	{
		$("a[rel]").overlay({
			top: 15,
			left: "25%",
			
			expose: 
			{		 
				color: '#000', 
				loadSpeed: 200, 
				opacity: 0.6 
			},
	 
			onBeforeLoad: function() 
			{ 	 
				var wrap = this.getContent().find(".contentWrap"); 
				wrap.load(this.getTrigger().attr("href")); 
			}	 
		}); 
	}

	if($("#partenaires").length > 0)
	{	
		if($("ul.partenaires li.img_part").length > 0)
		{
			$img = "<ul class='part_img'>";			
			$("ul.partenaires li.img_part").each(
				function()
				{
					$img += "<li>";
					$img += $(this).html()+"\r\n";
					$img += "</li>";
				}
			);			
			$img += "</ul>"
		}
		
		if($("ul.partenaires li.no_img_part").length > 0)
		{
			$no_img = "<ul class='part'>";			
			$("ul.partenaires li.no_img_part").each(
				function()
				{
					$no_img += "<li>";
					$no_img += $(this).html()+"\r\n";
					$no_img += "</li>";
				}
			);			
			$no_img += "</ul>"
		}
		
		$("ul.partenaires").remove();
		
		if($img.length > 0)
		{
			$("#partenaires").append($img);
		}
		if($no_img.length > 0)
		{
			$("#partenaires").append($no_img);
		}
	}

}
