

$(document).ready(function() {

    
	var _bHidden = true; // Hidden by default.	

	var _otDiv = $("#eventTitleHint");
	var _oDiv = $(".allHints");
	_otDiv.hide();	

	var _otLink = $("#eventTitleHintLink")

	var tipsBox = new function(){

		_otLink.bind("click", function(){
							
				_otDiv.toggle("slow");
				
			;}
		);
	     
	};	
	
}); //end window.load







$(document).ready(function() {

    
	var _bHidden = true; // Hidden by default.	


	var _otDiv = $("#eventAdmissionPhone");
	var _oIframe = $("#eventAdmissionPhone_ie6fix");
	var _oDiv = $(".allHints");
	_otDiv.hide(); _oIframe.hide();	

	var _otLink = $("#eventAdmissionPhoneLink")
	var tipsBox = new function(){

		_otLink.bind("click", function(){
							
			_otDiv.toggle("slow");
			_oIframe.toggle("slow");
			;}
		);
	     
	};	
	
}); //end window.load








$(document).ready(function() {

    
	var _bHidden = true; // Hidden by default.	


	var _otDiv = $("#eventDescriptionHint");
	var _oDiv = $(".allHints");
	_otDiv.hide();	

	var _otLink = $("#eventDescriptionHintLink")
	var tipsBox = new function(){

		_otLink.bind("click", function(){
							
			_otDiv.toggle("slow");
			;}
		);
	     
	};	
	
}); //end window.load








$(document).ready(function() {

    
	var _bHidden = true; // Hidden by default.	


	var _otDiv = $("#eventWebsiteURL");
	var _oDiv = $(".allHints");
	_otDiv.hide();	

	var _otLink = $("#eventWebsiteURLLink")
	var tipsBox = new function(){

		_otLink.bind("click", function(){
							
			_otDiv.toggle("slow");
			;}
		);
	     
	};	
	
}); //end window.load














$(document).ready(function() {

    
	var _bHidden = true; // Hidden by default.	


	var _otDiv = $("#eventTypeHint");
	var _oDiv = $(".allHints");
	_otDiv.hide();	

	var _otLink = $("#eventTypeHintLink")
	var tipsBox = new function(){

		_otLink.bind("click", function(){
							
			_otDiv.toggle("slow");
			;}
		);
	     
	};	
	
}); //end window.load














$(document).ready(function() {

    
	var _bHidden = true; // Hidden by default.	


	var _otDiv = $("#eventLocationHint");
	var _oIframe = $("#eventLocationHint_ie6fix");
	var _oDiv = $(".allHints");
	_otDiv.hide(); _oIframe.hide();	

	var _otLink = $("#eventLocationHintLink")
	var tipsBox = new function(){

		_otLink.bind("click", function(){
							
			_otDiv.toggle("slow");
			_oIframe.toggle("slow");
			;}
		);
	     
	};	
	
}); //end window.load






$(document).ready(function() {

    	var _otDiv = $("#eventVenueHint");
		var _oIframe = $("#eventVenueHint_ie6fix");
	var _oDiv = $(".allHints");
	_otDiv.hide();	_oIframe.hide();

	var _otLink = $("#eventVenueHintLink")
	var tipsBox = new function(){

		_otLink.bind("click", function(){
							
			_otDiv.toggle("slow");
			_oIframe.toggle("slow");
			;}
		);
	     
	};	
	
}); //end window.load


$(document).ready(function() {
	var _oDiv = $(".allHints");
   _oDiv.bind("click", function(){
	   	_oDiv.hide("slow");
		
		});  
});



$(document).ready(function() {

    var _otDiv = $("#eventAdmissionTicketPrice");
	var _oIframe = $("#eventAdmissionTicketPrice_ie6fix");
	var _oDiv = $(".allHints");
	_otDiv.hide(); _oIframe.hide();	

	var _otLink = $("#eventAdmissionTicketPriceLink")
	var tipsBox = new function(){
        
		_otLink.bind("click", function(){
							
			_otDiv.toggle("slow");
			_oIframe.toggle("slow");
			;}
		);
	     
	};	
	
}); //end window.load

/* cyheckbox limitation function */

$(document).ready(function() {

$("input[@name='category_contentid']:checkbox").limitSelection(3);	

$("#phone").mask("999-999-9999"); 

$("#venue_id").limitSelection(3);
	
});
	
$(document).ready(function() {
	var validator = $('#frmEvent').validate({
		// rules
		rules: {
			name: 'required',
		
			description: 'required',
		
			phone: 'required', 
			
		    event_begins: 'required',
			
			begins_time: 'required',
			
			category_contentid: 'required',	
			
			location_contentid: 'required',			
					
			
			passconf: {
				required: true,
				minlength: 6,
				equalTo: '#pass'
			},
			
			countrycode: {
				required: true,
				digits: true
			},
			
			agree: 'required'
		},
	
		// messages
		messages: {
			name: 'please enter an event title',
		
			description:  'please enter an event description of no more than 1,000 characters, including spaces.',
		
			phone: 'please enter a valid phone number',
			
			event_begins: 'please select a date or dates for your event',
			
			begins_time: 'please select a start time for your event',
			
			category_contentid: 'please select between one and three "types" within a single category',
			
			location_contentid: 'please select a location',
			
			
			passconf: {
				required: 'confirm password field cannot be left blank',
				minlength: jQuery.format('please enter at least {0} characters'),
				equalTo: 'Enter the same password as above'
			},
			
			countrycode: {
				required: 'country code field cannot be left blank',
				digits: 'please use digits (0-9) only'
			},
			
			agree: 'you must agree to the terms &amp; conditions'
		},
		
		event: 'submit',
		
		// error
		errorClass: 'formErrorClass',
		errorElement: 'span',
		errorLabelContainer: $('.formErrorDisplay'),
		highlight: function(element, errorClass) {
			$(element).addClass(errorClass);
			$(element.form).find('label[for=' + element.id + ']').addClass(errorClass);
		},
		unhighlight: function(element, errorClass) {
			$(element).removeClass(errorClass);
			$(element.form).find('label[for=' + element.id + ']').removeClass(errorClass);
		}
	});
});








