var triangle = new Class({
    
    /* requires: Raphael */
    
    initialize: function(triangle, direction){
        
        this.t = Raphael(triangle, 12, 12); 
        this.fill = new Color(triangle.getParent().getStyle('background-color')).rgbToHsb();
        this.fill[2] = Math.max(0,this.fill[2]-20);
        this.fill = new Color(this.fill.hsbToRgb());
        
        switch(direction) {
        
        	case 'left':  
        		this.t.path('M 0 12 L 12 12 12 0 z').attr({'stroke':'none','fill':this.fill.hex});
        	break;
        	
        	case 'right':
        		this.t.path('M 0 0 L 12 12 0 12 z').attr({'stroke':'none','fill':this.fill.hex}); 
        	break;
        	
        	default:
        	
        	break;
        	     
        }
        
		
    }
    
});
