

		 $(document).ready(function(){	
		   
		   $('a.email').nospam({
				replaceText: true,
				filterLevel: 'low'
			});  
		   
		   
		   $('.small_reference a') 
					   .css({backgroundPosition: '0px 0px'}) // workaround for FF 2.0 bug 
					   .click(function(){ 
							var w = $(this).attr('id').split('_');
							var pos_slider = (w[1]-1)*(-659);
							var pos_x =((w[1]+2)%3)*232;
							var pos_y =Math.floor(((w[1]-1)/3))*154;
							
							//$(this).attr(pos)
							
							
							//alert(pos_y+'px');		   
									   
						   $('.small_reference').animate({backgroundPosition: '('+pos_x+'px '+pos_y+'px)'}); 
						   $('#slider').animate({ left: pos_slider+'px' }, 'slow');
							$('body, html').animate({scrollTop: '180px'}, 2000);
						return false;
			});
					   
					   
			$('a.next_link').click(function(){	
					var ch = $('#slider ul').children().size();
					var pos = parseInt($('#slider').css('left'));
					if(pos > (ch-1)*(-659) )
						$('#slider').animate({ left: pos-659+'px' }, 'slow');
					
					
					return false;
					/*$('#slider').animate({ left: (pos-580) }, 'slow');
					return false;*/
			   });
			   
			   $('a.prev_link').click(function(){	
					var pos = parseInt($('#slider').css('left'))  ;
					if( pos != 0)
						$('#slider').animate({ left: (pos+659+'px') }, 'slow');
					return false;
			   });
			   
			   		   
		 });
		 
		 
		/* $(document).ready(function(){
			$("a[rel^='prettyPhoto']").prettyPhoto();
		});
		*/
		 
		