
	// Do not edit the following function calls:

	
	// Call your functions here:
		


// Do not edit the following functions:

function disableSubmit() {
	$('input[@type=submit]').click(function(){ $(this).attr('disabled',true); });
}

// Your functions go here


// initialise accordion
$(document).ready(function(){ 
	
	// add additional classes for specific background images
	$('#accordion h4:first span').addClass('first');
	$('#accordion h4:last span').addClass('last');
	$('#accordion .collapsable_content:last').addClass('last');


	
	// start accordion
	$('#accordion').accordion({
		autoheight: false,
		header:'h4'
	});
});



// fix form 'default' text

        // form field IDs to fix
//        var defaultFormIds = [
//            'ask-name',
//            'ask-emailaddress',
//            'signup-name',
//            'signup-emailaddress',
//            'question'
//        ];
//        
        // start an array to contain the default text for each element
        var defaultText = [];
        
        $(document).ready(function(){ 

            // loop through all default fields
            $(defaultFormIds).each(function(index){

                // save the initial value
                defaultText[index] = $('#'+this).val();

                // add default behaviour
                $('#'+this).addClass('default').focus(function(){
                                        
                    // condition : on click, check if input contains default text 
                    if ($(this).val() == defaultText[index]) {
                        $(this).val("");
                        $(this).removeClass('default');
                    }
                    
                }).blur(function(){
                    
                    // condition : on loss of focus, check if input is blank
                    if ($(this).val() == "") {
                        $(this).val(defaultText[index]);
                        $(this).addClass('default');
                    }                     
                });
            });
            
            
            // as above, for select input box
            $('select#region').change(function(){
                
            });
        });
