
$(document).ready(function() {	
	
	// tabs
	$(function() { 
		// setup ul.tabs to work as tabs for each div directly under div.panes 
		$("ul.tabs").tabs("div.panes > div.tabContent"); 
	});
	
	
	// toggle containers open and closed
	
	//Hide (Collapse) the toggle containers on load
	$(".toggle_container").hide(); 

	//Switch the "Open" and "Close" state per click
	$("h4.trigger").toggle(function(){
		$(this).addClass("active");
		}, function () {
		$(this).removeClass("active");
	});

	//Slide up and down on click
	$("h4.trigger").click(function(){
		$(this).next(".toggle_container").slideToggle("slow");
	});


	// superfish menu plugin
	$("ul.sf-menu").superfish(); 
	
	
	// ie6 pseudo class hover links fix
	$(function() {
		$('li').hover (
				function() { $(this).addClass('over'); }, 
				function() { $(this).removeClass('over'); }	  
		);
	});
	

/*
	$("li#menuElem_LI_0_2_1 a").click(function(event) {
		return false;
	});
	
	
	$("li#menuElem_LI_0_2_1 li a").click(function(event) {
		return true;
	});
*/



$("li#mainNav_LI_0_2_1 a").click(function(event) {
		if ( !$(event.target).is('li#mainNav_LI_0_2_1 li a') ){
			event.preventDefault();
		}
});

$("a.print").click(function(event){										   
	window.print();
});
/*Topics Landing Page */


/* Search Page Buttons */
$('.btnSearchImg input').mouseover(function() {
  	$(this).addClass("on");
});

$('.btnSearchImg input').mouseout(function() {
  	$(this).removeClass("on");
});

	$('.searchInput').val("SEARCH");
    $('.searchInput').focus(example_clean_field).blur(example_reset_field).each(example_populate_field);
    function example_populate_field() {
        if (!$.data(this, 'default')) {
            $.data(this, 'default', $(this).val());
            /*if ($(this).hasClass('defaultText')) {
            $(this).removeClass('defaultText');
            }*/
            $(this).addClass('defaultText');

        }
    }
    function example_clean_field() {
        if (!$(this).hasClass('hasfocus')) {
            $(this).addClass('hasfocus').val('');
            if ($(this).hasClass('defaultText')) {
                $(this).removeClass('defaultText');
                $(this).removeClass("inputError");
            }

        }

    }
    function example_reset_field() {
        if ($(this).val() == '') {
            $(this).removeClass('hasfocus').val($.data(this, 'default'));
            if (!$(this).hasClass('defaultText')) {
                $(this).addClass('defaultText');
            }
        }
    }

	$(".contactUsCheckList").hide();
	$(".contactUsShowCheckList input").click(function(){
		var test = $(this).attr("checked");
		if($(this).is(":checked") == true){
			$(".contactUsCheckList").show();

		}
		else{
			$(".contactUsCheckList").hide();
		}
	});

});





