
	$(function(){
		var maxLengthRun = function() {
			var $prev = $(this).prev();

			if(this.value.length > 200)
			{
				if($prev.attr('class') != 'errors')
				{
					$(this).before('<p class="errors">Please do not enter more than 200 characters</p>');
				}
			}
			else
			{
				if($prev.attr('class') == 'errors')
				{
					$prev.remove();
				}
			}
		};

		$(".maxlength").live('keydown', maxLengthRun);
		$(".maxlength").live('blur', maxLengthRun);

		var tabContainers = $('.tab');
		
		if(tabContainers.length)
		{
			tabContainers.hide().filter(':first').show();

			$('.tabLinks a').click(function () {
				tabContainers.hide();
				tabContainers.filter(this.hash).show();
				$('.tabLinks a').removeClass('selected');
				$(this).addClass('selected');
				return false;
			}).filter(':first').click();
		}

		if($.browser.mozilla)
		{
			$('.no-complete').attr('autocomplete', 'off');
		}
		
		if(typeof gapi !== 'undefined')
		{
			gapi.plusone.render("plusOne", {size: "standard", count: "false"});
		}
	});

