// JavaScript Document

	$(document).ready(function(){
				
				$('#controller').jFlow({
					slides: '#maincontent',
					controller: '.jFlowControl',
					width: '100%',
					height: '388px',
					easing: 'easeOutBack',
					duration: 400,
					next: '.jFlowNext',	
					interval: 9999999999 /*so it does not automatically scroll. Gets a little cranky when you add too many 9s though.*/
							
				});		
				
				$('#controller2').jFlow({
					slides: '#top',
					controller: '.jFlowControl2',
					width: '100%',
					height: '320px',
					easing: 'swing',
					duration: 800,
					interval: 19000,
					next: '.jFlowNext2',
					prev: '.jFlowPrev2'
				});	
						  
				 $('#news').cycle({ 
					fx:     'fade', 
					timeout: 6000, 
					delay:  -2000 
				});
				
				$('#hpportfolio').cycle({ 
					fx:     'scrollDown', 
					timeout: 6000, 
					delay:  -2000,
					easing: 'easeOutBack',
					pause:   1
				});
				
				$('a.nudge').hover(function() { //mouse in
				$(this).animate({ paddingTop: 0 }, 400, 'easeOutBounce');
				}, function() { //mouse out
				$(this).animate({ paddingTop: 20 }, 400, 'easeOutBounce');
				});
				
				$('a.rnudge').hover(function() { //mouse in
				$(this).animate({ paddingRight: '20px' }, 400, 'easeOutBounce');
				}, function() { //mouse out
				$(this).animate({ paddingRight: 0 }, 400, 'easeOutBounce');
				});
				
				$('.scroll-pane').jScrollPane({
					scrollbarWidth: 12,
					wheelSpeed: 100            
				});		         
				
				/*form examples*/
				
				$('#search').example('Search');
				$('#name').example('John Smith');
				$('#email').example('example@address.com');
				$('#phone').example('For us to contact you');
				$('#site').example('www.example.com');
				$('#company').example('Foundation');
				$('#messagebox').example('How can we help you?');
				
				/*end of form examples*/
				
				/*
				
				$("#tag").click(function(){
				$("#tag").animate({ right: '900px', opacity: 'hide'}, 'slow', 'easeOutBack');
				
				});
				
				*/
				
				$.uGallery(); /*Initiates the Gallery*/      
				});     
					