// Contact Us Specific JavaScript 
/* this is for the channels page. it hides/shows all the country headers*/
$(document).ready(function() {
	$(".collapsable h3").addClass("active");
	$(".hide_all").show();

	$(".collapsable h3").click(function(){
		$(this).next(".contact-info").slideToggle(200);
		$(this).toggleClass("active");
		$(".show_all").show();
		return false
	});
	
	$(".show_all").click(function(){
		$(".contact-info").slideDown(200);
		$(".collapsable h3").addClass("active");
		$(".show_all").hide();
		return false;
	});
	
	$(".hide_all").click(function(){
		$(".contact-info").slideUp(200);
		$(".collapsable h3").removeClass("active");
		$(".show_all").show();
		$(".hide_all").hide();
		$(this).hide();
	});
	
	$(".show_all").click(function(){
		$(".hide_all").show();
		$(this).hide();
		});
		
		// for the contact page form on the right to jump to the channel links
		$('#CountryForm').change(function() {
			//alert('Handler for contact form' + $("select#ContactForm").val());
			window.location.href = "/x11043.xml" + $("select#CountrySelect").val();
		});
});

//Contact Us Tabs only for the inline style
$(function () {
	var tabContainers = $('div#tab-box > div'); //Grab all of the ordered lists in div tab-box 
	tabContainers.hide().filter(':first').show(); //Hide all of the ordered lists in div tab-box except the first which will serve as the default
						
	$('div#tabs ul.selectTabs a').click(function () { //On click of the anchor tags under unordered list of patner-tabs perform the following functions
		tabContainers.hide(); //trigger our variable to hide and show
		tabContainers.filter(this.hash).show(); //show the ordered list with the correpsonding id
			$('div#tabs ul.selectTabs a').removeClass('active'); //remove the active class on the achor tag under the partner-tabs list
			$(this).addClass('active'); //add the active class to the corresponding anchor tag
			return false;
	 }).filter(':first').click(); //default first tab is active until interaction
});