$(document).ready(function() {
	$(".scroll-pane").jScrollPane({
		showArrows:true,
		scrollbarWidth:5 ,
		scrollbarMargin: 10
	});
	
	/*$(".scroll-pane2").jScrollPane({
		showArrows:true,
		scrollbarWidth:5 ,
		scrollbarMargin: 10
	});*/
	
	$("a.images-set").fancybox({
		'transitionIn'	: 'elastic', 
		'transitionOut'	: 'elastic',
		'titlePosition': 'over', 
		'padding': 0,
		'titleFormat': function(title, currentArray, currentIndex, currentOpts) {
		    return '<span id="fancybox-title-over"><b>' +  (currentIndex + 1) + ' / ' + currentArray.length + '</b>  ' + title + '</span>';
		}
	});
	
	/*$("#logo, #show2, #show3").click(function(){ 
		$("#form").slideToggle("slow");
		return false;
	});*/
	/*$(".show-service").click(function(){ 
		$(this).children().slideToggle("slow");
		return false;
	});*/
	
	$('#send').click(function(){ 
		var text = $("textarea").val();
		$.post("/sendmail.php",
			{ text: text}, 
				function(data){
					$("#form").slideToggle("slow");
				}
		 );
		return false;
	});
	$(".scroll-pane a").click(function(){ 
		$(".photo").hide();
		$(".photo-desc").hide();
		$(".scroll-pane li").removeClass("selectedsite");
		var id = $(this).attr("href");
		$(this).parent().addClass("selectedsite");
		$(id).show();
		$(id+"-desc").show();
		$(".widget-content").hide();
		return false;
	});
	
	$(".scroll-pane a").hover(function(){ 
		//$(this).addClass("selectsiteurl");
		$(this).parent().addClass("selectsite");
	},function(){
		$(this).parent().removeClass("selectsite");
		//$(this).removeClass("selectsiteurl");
	});
	
	$("#logo,#show").click(function(){ 
		$(".photo").hide();
		$(".photo-desc").hide();
		$(".widget-content").show();
		$(".scroll-pane li").removeClass("selectedsite");
		return false;
	});
	
});