

function slideL(){

	
	

	$('#imageslider').animate({
		'marginLeft' : "-=300px"
	}, 500,
		function (){
			var dwidth = document.getElementById('imageslider').offsetWidth;
			var dmarl = parseInt(document.getElementById('imageslider').style.marginLeft);
			//var tot = dmarl + dwidth;
			var base = '-' + (dwidth - 876 )+ 'px'
			//window.alert(base);
			if (dmarl + dwidth <= 876){
				$('#imageslider').animate({
					'marginLeft' : base
				}, 500);
			}
		}
	);
	

	//$(".block").animate({"left": "-=50px"}, "slow");
  
  // $('#imageslider').animate({
    // opacity: 0.25,
    // marginLeft: "-=50px"
  // }, 600, function() {
    ////Animation complete.
  // });

}
function slideR(){
	//window.alert(document.getElementById('imageslider').style.marginLeft);
	//if (document.getElementById('imageslider').style.marginLeft < '0px' ){
		$('#imageslider').animate({
			'marginLeft' : "+=300px"
		}, 500,	
			function (){
				if (document.getElementById('imageslider').style.marginLeft >= '0px' ){
					$('#imageslider').animate({
						'marginLeft' : "0px"
					}, 500);
				}
			}
		);
	//}
	

	
}

$('#arrow-l').click(function() {

	window.alert('ok');
  $('#imageslider').animate({
    opacity: 0.25,
    marginLeft: "-=50px"
  }, 600, function() {
    // Animation complete.
  });
});


$(document).ready(function(){
	$("#design").mouseover(function(){
		$("#designtxt").slideDown("slow");
		return false;
	});	 
	$("#design").mouseout(function(){
		$("#designtxt").slideUp("slow");
		return false;
	});
	$("#oils").mouseover(function(){
		$("#oilstxt").slideDown("slow");
		return false;
	});	 
	$("#oils").mouseout(function(){
		$("#oilstxt").slideUp("slow");
		return false;
	});
	
	$("#development").mouseover(function(){
		$("#developmenttxt").slideDown("slow");
		return false;
	});	 
	$("#development").mouseout(function(){
		$("#developmenttxt").slideUp("slow");
		return false;
	});	
	
	$("#graphic").mouseover(function(){
		$("#graphictxt").slideDown("slow");
		return false;
	});	 
	$("#graphic").mouseout(function(){
		$("#graphictxt").slideUp("slow");
		return false;
	});
	
	$("#watercolors").mouseover(function(){
		$("#watercolorstxt").slideDown("slow");
		return false;
	});	 
	$("#watercolors").mouseout(function(){
		$("#watercolorstxt").slideUp("slow");
		return false;
	});
	
	$("#sculpture").mouseover(function(){
		$("#sculpturetxt").slideDown("slow");
		return false;
	});	 
	$("#sculpture").mouseout(function(){
		$("#sculpturetxt").slideUp("slow");
		return false;
	});
	
	$("#prints").mouseover(function(){
		$("#printstxt").slideDown("slow");
		return false;
	});	 
	$("#prints").mouseout(function(){
		$("#printstxt").slideUp("slow");
		return false;
	});
	
	// $("#statement").mouseover(function(){
		// $("#statementtxt").slideDown("slow");
		// return false;
	// });	 
	// $("#statement").mouseout(function(){
		// $("#statementtxt").slideUp("slow");
		// return false;
	// });
	
 
		
});


function view(item){
	var params = 'item='+item;
	var script = 'art-display.php';
	var target = 'matte';
	SendAjaxPost(script,target,params);
}

function SendAjaxPost(script,target,params,code){
if (window.XMLHttpRequest)
 {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200){
		document.getElementById(target).innerHTML=xmlhttp.responseText;
		//Any code to eval?
		if (!!code && code!=''){
			eval(code);
		}
	}
  }
xmlhttp.open("POST",script,true);
xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlhttp.setRequestHeader("Content-length", params.length);
xmlhttp.setRequestHeader("Connection", "close");
xmlhttp.send(params);

}

