
var app = {
	
	roundiesHover: function(){
		//add roundies on hover
		$(function(){
			$('#siteNav li a').hover(function() {
				// Stuff to do when the mouse enters the element;
				$(this).addClass('box_round');
			}, function(){$(this).removeClass('box_round');});
		});
	
		
	},
	
	setupSlider: function(){
		// setup slider
		
			$("#slider").easySlider({
				controlsBefore:	'<p id="controls">',
				controlsAfter:	'</p>',
				auto: false, 
				continuous: true
			});
			$("#slider2").easySlider({
				controlsBefore:	'<p id="controls2">',
				controlsAfter:	'</p>',		
				prevId: 'prevBtn2',
				nextId: 'nextBtn2'	
			});
		
		
	},
	
	setupColorBoxPlugin: function(){
		$(function(){
		   $("a[rel='email']").colorbox();
	   });

		
		$(function(){
			$("a[rel='vm']").colorbox({transition:"fade"});
	   });

		$(function(){
			$("a[rel='hp']").colorbox({transition:"fade"});
	   });
	


		$(function(){
		   $("a.item").colorbox();
	   });
		
	},
	
	setupSliderButtons: function(){
		$(function(){
		  $('.item').hover(function() {
		  	// Stuff to do when the mouse enters the element;
				$('.itemDescription', this)
					.stop(true)
					.animate(
						{top: '317px'},
						{duration: 100,queue:false}
					)
		  }, function() {
		  	// Stuff to do when the mouse leaves the element;
				$('div.itemDescription')
				.stop(true)
				.animate(
					{top: '343px'},
					{duration: 200}
					)
		  });
	   });
		
	},
	
	setupEmailForm: function(){
			$("#pullTab").click(function(){
				$("#emailWrapper").slideToggle("slow");
				$(this).toggleClass("active"); return false;
			});
		/*
			TODO add bg image for state change
		*/
		
	}
	
	
	//end var app
};

$(function(){
	
	app.setupSlider();
	app.setupSliderButtons();
	app.setupColorBoxPlugin();
	app.setupEmailForm();
	app.roundiesHover();
	
	
		$(function(){
		   $("hr").addClass('box_round');
	   });

		$(function(){
			$('#skillssection a:odd').addClass('highlight');
		});

	
});	




