$(document).ready(function() {
	
	$("h3#full").click(function() {

		$("#ad_col2box").hide("slow");
		$.get("directory/full", function(data){
		$("#listings").html(data);
		$("a.group").fancybox({
				'hideOnContentClick': true
		});

			$("a.group").fancybox({
				'zoomSpeedIn':		300, 
				'zoomSpeedOut':	300, 
				'overlayShow':		true
		
			});		
		});
	});

	$("input.mybutton").click(function() {
		var cat = $('select#category').val();
		var src = $('select#source').val();
		var tgt = $('select#target').val();
		var combo = src + '-' + tgt;
		$("#ad_col2box").hide("slow");
		$.get("directory/newlist", {certification:cat, languages:combo}, function(data){
		$("#listings").html(data);
		$("a.group").fancybox({
				'hideOnContentClick': true
			});

			$("a.group").fancybox({
				'zoomSpeedIn':		300, 
				'zoomSpeedOut':	300, 
				'overlayShow':		true

			});
	
		});
	
	});


	$(function () {
	    var tabContainers = $('#text > div');
    
	    $('div.tabs ul.tabNavigation a').click(function () {
	        tabContainers.hide().filter(this.hash).show();
        
	        $('div.tabs ul.tabNavigation a').removeClass('selected');
	        $(this).addClass('selected');
        
	        return false;
	    }).filter(':first').click();
	});
	
//reveal paragraphs on the career page	
		$('h2').toggle(function() {
		$(this).removeClass('add').addClass('sub');	
		$(this).parent().find('.bodytext').removeClass('off');
			}, function() {
			$(this).removeClass('sub').addClass('add');
			$(this).parent().find('.bodytext').addClass('off');
	    });
		$('.bodytext').addClass('off');
		$('.entry h2').addClass('add');  

				
//reveal registration form on events page
	$('.register').click(function(){
		var whichForm = this;
		$('.registration_form').hide();
	   $(whichForm).parent("div").next("div").show(300);
	var formShow = this;
    $('html,body').animate({scrollTop:$(formShow).offset().top},'slow');
	});
  	
});
