$(function() {
	$("div.car").jCarouselLite({
		btnNext: ".car_next",
		btnPrev: ".car_prev",
		mouseWheel: true,
		visible: 3
	});
});

// xAddEventListener r8, Copyright 2001-2007 Michael Foster (Cross-Browser.com)
// Part of X, a Cross-Browser Javascript Library, Distributed under the terms of the GNU LGPL

function xAddEventListener(e,eT,eL,cap)
{
  if(!(e=xGetElementById(e)))return;
  eT=eT.toLowerCase();
  if(e.addEventListener)e.addEventListener(eT,eL,cap||false);
  else if(e.attachEvent)e.attachEvent('on'+eT,eL);
  else {
    var o=e['on'+eT];
    e['on'+eT]=typeof o=='function' ? function(v){o(v);eL(v);} : eL;
  }
}
//CHANGE TITLE ON FOTO HOVER
$(function(){
	$('div#main_content div#fotoprojecten div#fotos div.car ul li[@title]').hover(function(){
		$('div.pTitle').html(this.title);
		var plink = $(this).children('a').attr('href');
		$('a.pLink').attr({'href' : plink});
	});
});

//ORDER TICKBOXJES
$(function(){
	$('td.select img').click(function(){
		var src = $(this).attr('src');
		if(src == '/files/images/order_sel.jpg'){
			$(this).attr({ src: "/files/images/order_unsel.jpg" });
			$(this).parent().children('input').attr({ value: "0" });
		}else{
			$(this).attr({ src: "/files/images/order_sel.jpg" });
			$(this).parent().children('input').attr({ value: "1" });
		}
	});
});