/* -------------------------------------- */
			/* Stack.Interface */
/* -------------------------------------- */

function Interface() {
	
	var Interface = this;

//
	
	Interface.init = function(){
		this.pagenav.init();
		this.nav.init();
		this.rotators.init();
	};

//

	Interface.pagenav = {

		init : function(){
			this.build();
		},
		
		build : function(){
			var win = $(window).height();  
			var doc = $(document).height();			
			var $btt = $('<p />').html('<a href="#wrapper"><em>back to top</em></a>');

			// if( doc > win ) {
			// 	$("#col2").append($btt);
			// }
			
		}
		
	}

//

	Interface.nav = {
		
		init : function(){
			this.build();
			this.observe();			
		},
		
		build : function(){
			$("#mainNav tr td:last a").addClass("last");
			$("#footerNav table tr td:last a").addClass("last");
		},
		
		observe: function(){
			
			$("#mainNav a").each(function(){
				var $sib = $(this).parent('td').next().find('a');
				var ocolor = "rgb(146, 128, 86)";
				
				if($(this).hasClass('active')){
					$sib.css("border-left-color","transparent");					
				}
				else {
					$(this).hover(
						function(){
							$sib.css("border-left-color","transparent");
						},
						function(){
							$sib.css("border-left-color",ocolor);
						}
					);		
				}		
				
			});


			
		}		
		
		
	};

//
	
	Interface.rotators = {
		
		init : function(){
			this.build();			
		},
		
		build : function(){

			$('#slides').cycle({ 
		    fx:     'scrollLeft', 
		    speed:  1500,
		    timeout: 6000, 
		    pager:  '#hrNav',
		    pause: 0,     // true to enable "pause on hover" 
		    pauseOnPagerHover: 1   // true to pause when hovering over pager link      
			});

		}		
		
	};

//	
	

	
	


}; // end Interface



















