window.addEvent('domready', function() {
	
	//create our Accordion instance
	var myAccordion = new Accordion($('accordion'), 'h4.toggler', 'div.element', {
		opacity: false,
		duration: 200,
		onActive: function(toggler, element){
			toggler.setStyle('color', '#000');
			toggler.setStyle('background', 'url(./sites/all/themes/g2ix//images/accordion_arrow.png) no-repeat 180px 27px');
			
		},
		onBackground: function(toggler, element){
			toggler.setStyle('color', '#999');
			toggler.setStyle('background', 'none');
			//toggler.setStyle('background', 'url(./images/accordion_arrow.png) no-repeat 180px 27px)');
		}
		
		
		//transition: Fx.Transitions.Bounce.easeOut
	});
});
function clickclear(thisfield, defaulttext) {
	if (thisfield.value == defaulttext) {
		thisfield.value = "";
	}
}
	
function clickrecall(thisfield, defaulttext) {
	if (thisfield.value == "") {
		thisfield.value = defaulttext;
	}
}

jQuery.noConflict();
jQuery(document).ready(function(){
var tmp="1";
var clicked;
jQuery(".careers_links a").click(function(event){
	jQuery(".career_link_selected").animate({"top": jQuery(this).offset().top-277+"px"}, "fast");
	clicked = jQuery(this);				
	var idToLoad = clicked.attr("id").split('_');
	
	//alert(tmp.attr("id") + clicked.attr("id"));
	if(idToLoad[1] != tmp){
		jQuery("#career_content").find("div:visible").fadeOut("fast", function(){
			jQuery(this).parent().parent().parent().find("#"+"career_content_"+idToLoad[1]).fadeIn();
			//jQuery("#block-block-15 div[id='career_content_"+ idToLoad[1]+"']").fadeIn();
		})
	}
	tmp = idToLoad[1];
});
  
});