// JavaScript Document
var MESS_CONFIRM = 'confirm';
var MESSAGES = new Array();
MESSAGES[MESS_CONFIRM] = 'Are you sure you want to delete this item?';

$(document).ready(function(){	
	$('.homePageCalendar').datepicker({
			
	});
	$('.sideBarCalendar').datepicker({
		showOn: 'button',
		buttonImage: httpPath + '/images/calendar.gif',
		buttonImageOnly: true,
		showOn: 'both'
	});	

	$(".gradientButton").hover(
		function() {$(this).addClass("gradientButton-hover1")},
		function() {$(this).removeClass("gradientButton-hover1")}
	);	
	$(".gradientButtonHover2").hover(
		function() {$(this).addClass("gradientButton-hover2")},
		function() {$(this).removeClass("gradientButton-hover2")}
	);	
	
	$(".gradientButton1").hover(
		function() {$(this).addClass("gradientButton1-hover1")},
		function() {$(this).removeClass("gradientButton1-hover1")}
	);		
	
	$('p.faq').click(function(event){
	$(this).next('.answerBox').slideToggle();
    });
	
	$('.confirm').live('click', function(){
		return confirm(MESSAGES[MESS_CONFIRM]);
	});
	
	$('#clickBackground').bind('click', function(){
		$('.popup:visible').hide('blind', 'fast');
		$(this).hide();
	});
});


function htmlspecialchars(html) { 
	html = html.replace(/&/g, "&amp;"); 
	html = html.replace(/</g, "&lt;"); 
	html = html.replace(/>/g, "&gt;"); 
	html = html.replace(/"/g, "&quot;"); 
	return html; 
}
