jQuery.noConflict();

jQuery(document).ready(function() {
																
																
	// TABLE STRIPING + SELECTED LINKS + TABS													
	jQuery('tr:odd').addClass('odd');
	jQuery('tr:even').addClass('even');  
	
	var path = location.pathname.substring(1);
	jQuery('ul.IE6fix li a[href="' + path + '"]').addClass('selected-link');
  jQuery('ul.child-menu li a[href="' + path + '"]').addClass('child-link-selected');
	
	jQuery('#tabs').tabs();
																
	// SEARCH BY DEGREE
  // set the search-by-degree button to visible as 'core.css' defines it as invisible
  jQuery('a#search-by-degree').css('visibility', 'visible');
  // toggles (show/hide) the search-by-degree overlay on clicking the search-by-degree button
  jQuery('a#search-by-degree').click(function() {
  jQuery('#search-by-degree-overlay').toggle();
  return false;
  });
  jQuery('a.hide-degree-search').click(function() {
	jQuery('#search-by-degree-overlay').toggle();
  return false;
  });
		
	// HIDE/SHOW
  // close the offDiv content sections
  //(doing this with js instead of css means if no js, content is all visible)
  jQuery('.offDiv > .show-hide').hide();
  // show the correct buttons for each div
  // they are hidden with css for no-js users
  jQuery('.offDiv > .showLink').show();

  // showLink shows the content
  jQuery('a.showLink').click(function(){
  jQuery(this).siblings('.show-hide').slideToggle('fast');
  jQuery(this).parents('.offDiv').removeClass().addClass('onDiv');
  jQuery('a.hideAll').show();
  jQuery(this).hide();
  jQuery(this).siblings('.hideLink').show();
  return false;
  });
	
  // hideLink hides the content
  jQuery('a.hideLink').click(function(){
  jQuery(this).siblings('.show-hide').slideToggle('fast');
  jQuery(this).parents('.onDiv').removeClass().addClass('offDiv');
  jQuery('a.showAll').show();
  jQuery(this).hide();
  jQuery(this).siblings('.showLink').show();
  return false;
  });

  // title is clickable, and toggles the content
  jQuery(".Title").click(function() { 
  jQuery(this).next("div").slideToggle('fast');
  jQuery(this).parent("div").toggleClass('offDiv');
  jQuery(this).parent("div").toggleClass('onDiv');
  jQuery(this).siblings("a").toggle();
  });

  jQuery('.offDiv >.Title').click(function(){
  jQuery('a.hideAll').show();
  });

  jQuery('.onDiv >.Title').click(function(){
  jQuery('a.showAll').show();
  }); 
	
	
});
