//this handles the slider

	YAHOO.example = function() {
		var $D = YAHOO.util.Dom;
		var $E = YAHOO.util.Event;
		var $A = YAHOO.util.Anim;
		var $M = YAHOO.util.Motion;
		var $DD = YAHOO.util.DD;
		var $ = $D.get;
		var x = 1;
		return {
			init : function() {
				$E.on(['move-left','move-right'], 'click', this.move);
			},
			move : function(e) {
				$E.stopEvent(e);
				switch(this.id) {
					case 'move-left':
						if ( x === 1 ) {
							return;
						}
						var attributes = {
							points : {
								by : [284, 0]
							}
						};
						x--;
					break;
					case 'move-right':
					    var right_moves = 3;
					    /*try {
					        right_moves = ourwork_rightclicks;
					    } catch (e) {}*/
					    
						//if ( x === 5 ) { <!-- This value = number of new slides you need when scrolling to the right to show all thumbs.  Take the total number of thumbnails and divide that by 3 and you get this value. -->
						//alert("move-right. right_moves=" + right_moves);
						if ( x === right_moves ) { <!-- This value = number of new slides you need when scrolling to the right to show all thumbs.  Take the total number of thumbnails and divide that by 3 and you get this value. -->
							//alert("x=" + right_moves + ". can't move right");
							//RV 10/27/06 commenting out these two lines
							//x=1;		
							return;

							// RV 10/27/06 put this elseif in here to go back to beginning
							// DH 05.01.2007 Removed the elseif to see if search bots were looping on the site
//							x = 0;
//							var attributes = {
//								points : {
//									by : [(440 * (right_moves-1)), 0]
//								}
//							};
        				}
//						else {
							var attributes = {
								points : {
									by : [-284, 0]
								}
							};
//						}
						x++;
					break;
				};
				var anim = new $M('themes', attributes, .2, YAHOO.util.Easing.easeOut);
				anim.animate();
			}
		};
	}();
	YAHOO.util.Event.onAvailable('portfolio',YAHOO.example.init, YAHOO.example, true);
