(function($){



	/*
		
		Remove horizontal scrolling if their screen is to small.
		Only on home

	*/
	
	if($('body').hasClass('home')){
		
		if($(window).width() > 1200){
			
			$('body').css('overflow-x', 'hidden');
			
		}
		
	}

	$('#nav li:first').addClass('first');
	$('#nav li:last').addClass('last');
	
	$('.wpcf7-form p').each(function(i,el){ $(el).find('span:last').addClass('end'); });
	$('.post.small:odd').addClass('end');

	/*
		
		Slider

	*/

	if($('#slider').length){
		
		$('#slider').nivoSlider({
	        effect: 'random',
	        slices: 15,
	        animSpeed: 500,
	        pauseTime: 3000,
	        directionNav: true,
	        directionNavHide: true,
	        controlNav: true
	    });
		
	}
	
	/*

		Input Text

	*/

	$('input[type=text], textarea').each(function(i,el){

		var original_text = $(el).val();

		$(el).focus(function(){

			if($(this).val() == original_text){

				$(this).val('');

			}

		}).blur(function(){

			if($(this).val() == ''){

				$(this).val(original_text);

			}

		});

	});
	
	/*
		
		Update out select box

	*/
	
	$('.wpcf7-select[name=state]').change(function(){
				
		$('#select').text($(this).val());
		
	});
	
})(this.jQuery);
