// JavaScript Document//clear text box on click
function clearText(field){

if (field.defaultValue == field.value) field.value = '';
else if (field.value == '') field.value = field.defaultValue;

}

 $(document).ready(function(){

// Here we are getting all images and turning off the context menu. 
// return false is the same as calling .preventDefault() and .stopPropagation()
        $('img').bind("contextmenu",function(e){
            return false;
        });

// Here we disable default behaviors for mousedown which include the drag options.         
        $('img').bind("mousedown",function(e){
            return false;
        });	    
    
	$(function(){
	  $("#slides").slides({
		effect: 'fade',
		fadeSpeed:400,
		timeout:5000
		});
		});
	
	
	});



function setVisibility(id, value){

document.getElementById(id).style.display=value
	//$(id).css('visibility',value);
}




function termscheck() {
	if ($('#terms').attr('checked')==true) {
		return true;
	}
	else {
		alert ("Please agree to the terms and conditions");
		return false;
	}
};

// image zoom
/*$(document).ready(function() {

			$("a.example1").fancybox();



			$("a[rel=example_group]").fancybox({
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'titlePosition' 	: 'over',
				'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
					return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
				}
			});

			
		});*/
// Cufon
	Cufon.replace('h2.maintext');



