





$(document).ready(function() {
	/* Png fix*/


	
	/* tooltip */
		$(".myForm tbody tr td input[title], img.right[title]").tooltip({
			
			 position: "center right"
		});
	
	/* Menu */
	
		$("#nav ul li ul li ul").parent().append("<span></span>");
	
	$('#nav ul li').hover(function(){
		$(this).find('ul:first').slideDown('fast');
		return false;
		},function(){
		$(this).find('ul:first').slideUp('fast');
	});
	

	
/* Cufon font replacement */
	
	Cufon.replace('h1, h4');

/* Banner */



$('#banner').innerfade({ speed: '3000', timeout: 4000, type: 'sequence', containerheight: '500px' }); 

/* Signup Form */


	$('input[type="text"]').addClass("idleField");
	$('input[type="text"]').focus(function() {
		$(this).removeClass("idleField").addClass("focusField");
	    if (this.value == this.defaultValue){ 
	    	this.value = '';
		}
		if(this.value != this.defaultValue){
			this.select();
		}
	});
	$('input[type="text"]').blur(function() {
		$(this).removeClass("focusField").addClass("idleField");
	    if ($.trim(this.value) == ''){
	    	this.value = (this.defaultValue ? this.defaultValue : '');
		}
	});


//Place above all jQuery script

	
 $(".iframe").fancybox({
				'padding'			: 0,
				'autoScale'			: false,
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'overlayColor' 		: '#000',
				'showCloseButton' 	: true
			});
			
			
 $("#disclaimer_trig").fancybox({
				'padding'			: 0,
				'autoScale'			: false,
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'overlayColor' 		: '#000',
				'overlayOpacity'	: '1',
				'hideOnOverlayClick': false,
				'showCloseButton' 	: false,
				'enableEscapeButton': false
			});
			
			
			

$("#disclaimer_trig").trigger('click');



$('#continue-dis').click(function() {
    $.fancybox.close()
});


$("#agree").attr("checked", false);
$("#disagree").attr("checked", false);


$("input[name='agree']").change(function(){
if ($("input[name='agree']:checked").val() == 'agree') {
$('#disagreed').hide();
$('#agreed').show();

}
else{
$('#agreed').hide();	
$('#disagreed').show();
}
});

$('#agreed').click(function() {
    $('#box-notice').hide();
	 $('#box-dis').show();
});





		



   
	/* Preload images*/
    <!--

    if (document.images)
    {
      preload_image_object = new Image();
      // set image url
      image_url = new Array();
      image_url[0] = "http://www.baseresources.com.au/wp-content/uploads/education.jpg";
      image_url[1] = "http://www.baseresources.com.au/wp-content/uploads/projects.jpg";
      image_url[2] = "http://www.baseresources.com.au/wp-content/uploads/investor.jpg";
      image_url[3] = "http://www.baseresources.com.au/wp-content/uploads/contact.jpg";
	  image_url[4] = "http://www.baseresources.com.au/wp-content/themes/base/images/core/images/tooltip.png";
       var i = 0;
       for(i=0; i<=4; i++) 
         preload_image_object.src = image_url[i];
    }

    //-->
    





													 
/*

	// Slideshow (fade in/out)
	$('.imagecont').cycle({ 
			fx:    'fade', 
			speed:  4000
	 });
	
	// Adds fade in hover effects to thickbox images
	$('a.thickbox img').fadeTo("fast", .8);
	$("a.thickbox img").hover(function(){
	  $(this).fadeTo("slow", 1);
	  return false;
	},function(){
	  $(this).fadeTo("fast", .8);
	});
	

/*
	 $(document).pngFix(); 
*/
});


