jQuery(document).ready(function($) {
	
	jQuery('#list1b').accordion({ 
	    autoheight: false,
		header: ".head",
		active: -1
	});
	
	jQuery('#faqlist').accordion({
		autoheight: false,
		header: ".acc-head",
		active: -1
	});
	
	// Clear form on focus
	$(".clear-on-focus").focus(function() {
	if( this.value == this.defaultValue ) {
		this.value = "";
	}
	}).blur(function() {
		if( !this.value.length ) {
			this.value = this.defaultValue;
		}
	});
	
	// Fade Alert
	$(".notify")
	.fadeIn('slow')
    .animate({opacity: 1.0}, 2500)
    .fadeOut('slow', function() {
      $(this).remove();
    });
	
	// CAPTCHA Reset
	
	$('.captcha-reset-button').html('<a href="#" id="reset">Reset image</a>');
	$("#reset").live("click", function(){
		var currentDate = new Date();
		var time = currentDate.getTime();
		$('.captcha-reset').html('<img src="'+STYLESHEET_DIRECTORY+'/assets/php/secureimage/securimage_show.php?sid='+time+'" id="captcha" alt="spam captcha image">');
      	return false;
    });
	
	// Input overs
	$('.input-submit-find-green').hover(function(){
           $(this).addClass('hover-find-green');
    }, function() {
           $(this).removeClass('hover-find-green');
    });
	$('.input-submit-find-blue').hover(function(){
           $(this).addClass('hover-find-blue');
    }, function() {
           $(this).removeClass('hover-find-blue');
    });
	
	$('.input-submit-comment').hover(function(){
           $(this).addClass('hover-comment');
    }, function() {
           $(this).removeClass('hover-comment');
    });
	
	$('.input-submit-question').hover(function(){
           $(this).addClass('hover-question');
    }, function() {
           $(this).removeClass('hover-question');
    });
	
	$('.input-submit-contact').hover(function(){
           $(this).addClass('hover-contact');
    }, function() {
           $(this).removeClass('hover-contact');
    });
});


