//Fix for IE6 image flicker
if(document.uniqueID && !window.XMLHttpRequest ){
	document.execCommand("BackgroundImageCache",false,true)
}

// Javascript Stylesheet
document.write('<link rel="StyleSheet" href="/sites/all/themes/g2/g2-js.css" type="text/css" media="screen" />');




/* Homepage Image Rollovers */

$(document).ready(function(){
   $(".front #heroBox .block a").hover(function(){
     $(this).stop().animate({ opacity: '.6' }, 100, function(){ 
	 	$(this).animate({ opacity: '1' }, 500)
		});
		return false;
	});
});


/* Popup Window */
$(document).ready(function(){
	$('.popup').bind('click',function(e){popwindow(e)});
});
function popwindow(e){
	e.preventDefault();
	var href=$(e.target).attr('href');
	window.open(href,'','menubar=0,location=1,toolbar=0,width=400,height=400,scrollbars=yes,resizable=yes');
};












/* Submit Your CV Opt-in */

$(document).ready(function(){	
	/* set default visibility of fieldset dependent on which radio is checked */
	if ($('#edit-submitted-opt-in-question-opt-out').is(':checked')) {
  		$("#webform-component-proof_of_identity").hide();
	}
	if ($('#edit-submitted-opt-in-question-opt-in').is(':checked')) {
  		$("#webform-component-proof_of_identity").show();
	}
	/* Animate show/hide fieldset when radio clicked */
	if($(".page-candidates-submit-your-cv").length > 0){
		$("#edit-submitted-opt-in-question-opt-out").click(function(){
			$("#webform-component-proof_of_identity").slideUp(500);
		})
		$("#edit-submitted-opt-in-question-opt-in").click(function(){
			$("#webform-component-proof_of_identity").slideDown(500);
		})
	}
})

























