// JavaScript Document

$(document).ready(function(){
						   
// Slide down panels on Solutions page 

	$('.hideShowBtn span').click( function() {		
		var id = $(this).parent('div').attr('id');
		var content_panel = id.replace(/Btn/,'');
		$('#'+content_panel).slideToggle();
		var btn_text = $(this).text();
				
		if (btn_text == 'More...') {
			$(this).text('Less...');			
		} else {
			$(this).text('More...');
		}		
									});
	
	$('.hideShowBtn span:hover').css("cursor","pointer");
						   
// Password recovery panel

	$("a.forgot_link").click(function () {
		$("#login").css({ display:"none" });
		$("#recover_password").css({ display:"block" });			 
	});
	
	$("a.back_link").click(function () {
		$("#recover_password").css({ display:"none" });
		$("#login").css({ display:"block" });
	});


// jQuery Tabs 2.7 (had trouble using version 3 with this layout)
	
    $('#content_panel_inner').tabs({
		fxFade: true,
		fxSpeed: 'fast'			
	});
		
	var $listItems = $(".tabs-nav li");
 	$listItems.find('a').click( function() {
    	var itemNum = $listItems.index($(this).parent()[0]);
    	//alert("You just clicked list item number: " + itemNum);
				
		var ulBgPos = "0px " + ((itemNum * 46) - 10) + "px";
		//alert(ulBgPos);	
				
		$('.tabs-nav').css({ backgroundPosition: ulBgPos }); 
				
		return false; // prevents the hyperlink from firing
    });
	

	
});