function selectAllText(textbox) {
    textbox.focus();
    textbox.select();
}

$(document).ready(function() {

	//Default Action
	$(".taab_content").hide(); //Hide all content
	$("ul.taabs li:first").addClass("active").show(); //Activate first tab
	$(".taab_content:first").show(); //Show first tab content
	
	//On Click Event
	$("ul.taabs li").click(function() {
		$("ul.taabs li").removeClass("active"); //Remove any "active" class
		$(this).addClass("active"); //Add "active" class to selected tab
		$(".taab_content").hide(); //Hide all tab content
		var activeTab = $(this).find("a").attr("href"); //Find the rel attribute value to identify the active tab + content
		$(activeTab).fadeIn(); //Fade in the active content
		return false;
	});
	
	//Spanish tabs on Partners page
	var tabContainers = $('.es div#tabs > div');
    
	$('.es div.main ul.tabs a').click(function () {
		tabContainers.hide().filter(this.hash).show();
		$('div.main ul.tabs a').removeClass('selected');
		$(this).addClass('selected');
		return false;
	}).filter(':first').click();
	
	//Highlight all in txt boxes on English Partners page
	$('#txtInput').click(function() { selectAllText($(this)) });
	
	$('.widget_desc_copy').hide();
		
	$('a.widget_desc').click(function(slideDown) {
		$(this).toggleClass('widget_desc_active', 0);
		$('.widget_desc_copy').toggle(400);
	return false;
	});
	
	$('.widget_desc_copy_2').hide();
		
	$('a.widget_desc_2').click(function(slideDown) {
		$(this).toggleClass('widget_desc_active', 0);
		$('.widget_desc_copy_2').toggle(400);
		return false;
	});
	
	$('#slider_items').anythingSlider({
			startPanel          : 1,
			width : 600,
			height : 332, // Override the default CSS width
			autoPlay : true,
			buildArrows         : false,
			easing: 'easeInOutExpo',
			pauseOnHover        : false,
			startStopped        : false,
			stopAtEnd           : false,
			delay               : 5000,
			animationTime       : 600
                        });
});

swfobject.registerObject("InsertWidget_5b22c6e5-3408-4e74-9631-0fbfa7d1c03c", "9.0.0");
swfobject.registerObject("InsertWidget_b55cd867-ea5a-4156-b2ef-b5d997bfd150", "9.0.0");
