(function() {	

	Lateral = {
		
		themePath: null,
		
		setThemePath: function(path) {
			this.themePath = path;
		},

		setupSlider: function() {
			$('#slider').nivoSlider({
				directionNavHide	: false,
				controlNav			: true,
		        effect				: 'fade',
				pauseTime			: '3000'
			});
		}
	}

})();

$(document).ready(function() {
	
	$(".sideMenu li:last-child").css("border", "0")
	
	Lateral.setupSlider();
	
	$(".gallery a").fancybox({
		'overlayShow'	: false,
		'transitionIn'	: 'elastic',
		'transitionOut'	: 'elastic'
	});

	$(".ourTeam [title]").tooltip({
	   offset: [10, 2],
	   effect: 'slide'
	}).dynamic({ bottom: { direction: 'down', bounce: true } });


	$(".txtFld input").focus(function(){
		$(this).parent().addClass("active");
	});
	$(".txtFld input").blur(function(){
		$(this).parent().removeClass("active");
	});
	$(".txtArea textarea").focus(function(){
		$(this).parent().addClass("areaactive");
	});
	$(".txtArea textarea").blur(function(){
		$(this).parent().removeClass("areaactive");
	});
	
	var subject = $(".drpDwn span").text();
	$("#subject").val(subject);
	
	$(".drpDwn").click(function(){
			$(this).addClass("drpHover");
			
			$(".subjects").show();
			
		});
	
	$(".drpDwn").mouseover(function(){
		$(this).addClass("drpHover");
	}).mouseleave(function(){
		$(this).removeClass("drpHover");
		
	});
	$(".subjects li").click(function(){
		var subject = $(this).text();
			$(".drpDwn span").text(subject);
			$("#subject").val(subject);
	});
	
	$(".subjects").click(function(){
		$(this).hide();
		$(".drpDwn").removeClass("drpHover");
		
	});
	$(".subjects").mouseleave(function(){
		$(this).hide();
		$(".drpDwn").removeClass("drpHover");
		
	});
	
	$(".subjects").mouseover(function(){
		$(".drpDwn").addClass("drpHover");
		
	});
	
	// Themes page thumbnail hover effect
	$('.gallery a img').mouseover(function() {
		$(this).stop().fadeTo(300, 0.4);
	});
	$('.gallery a img').mouseout(function() {
		$(this).stop().fadeTo(300, 1.0);
	});
	
	
});
