prepare = function(options){
	for(i=0;i<options.length;i++){
		if(jQuery.fn[options[i]] == undefined){
			jQuery.fn[options[i]] = function(){};
			i--;
		}
	}
	$.ajaxFileUpload = function(){};
}

$(document).bind("ready", function(){
	prepare(["lightBox"]);
	
	$('a[rel="lightbox"]').lightBox();
});

$(window).bind("load", function(){
	width = 0;
	
	for(i=0;i<$('.slideshow img').length;i++){
		width += $('.slideshow img').eq(i).width();
	}
	width -= 4;
	$('.slideshow div').css({ 'width':width }).attr("direction", "right");
	$('.slideshow div').slideshow()
	setInterval("$('.slideshow div').slideshow()", 13000);
});

jQuery.fn.slideshow = function(){
	if($(this).attr("direction") == "left"){
		$(this).attr("direction", "right");
		$(this).animate({ 'left':0 },  10000, "linear");
	}else{
		$(this).attr("direction", "left");
		$(this).animate({ 'left':(parseFloat($(this).width())-900).reverse() }, 10000, "linear");
	}
}