/*---------------FINANCIAL SERVICES--------------------------*/

$(document).ready(function() { 
		//if(area=="fs"){
			//menuHideShow_fs();
						//	}
			

	});


function menuHideShow_fs(){
/*$.cookie("all_menu_areas_corp", null);
$.cookie("interfaces_menu_corp", null);
$.cookie("flexible_menu_corp", null);
$.cookie("advanced_menu_corp", null);
$.cookie("setup_menu_corp", null);
$.cookie("supported_menu_corp", null);

$.cookie("all_menu_areas_tpa", null);
$.cookie("interfaces_menu_tpa", null);
$.cookie("flexible_menu_tpa", null);
$.cookie("advanced_menu_tpa", null);
$.cookie("setup_menu_tpa", null);
$.cookie("supported_menu_tpa", null);*/

//alert(whichArea);
	$("div.all_menu_areas_container_fs").next().hide();	
	$("div.menu_area_fs").next().hide();	
	
//cookies
var all_menu_areas_fs = $.cookie('all_menu_areas_fs');
var interfaces_menu_fs = $.cookie('interfaces_menu_fs');
var flexible_menu_fs = $.cookie('flexible_menu_fs');
var advanced_menu_fs = $.cookie('advanced_menu_fs');
var setup_menu_fs = $.cookie('setup_menu_fs');
var supported_menu_fs = $.cookie('supported_menu_fs');


/*---------------all menu areas-----------*/
//looking at cookie name
if (all_menu_areas_fs=='expanded'){
		$("div#all_menus_fs").next().show();
		$("div#all_menus_fs").css({backgroundPosition: "4 -7"});
}

if (all_menu_areas_fs=='collapsed'){
		$("div#all_menus_fs").next().hide();
		$("div#all_menus_fs").css({backgroundPosition: "4 7"});
}

if(!all_menu_areas_fs){
		
		$.cookie('all_menu_areas_fs','collapsed');	
}


/*---------------interfaces-----------*/
if (interfaces_menu_fs=='expanded'){
	 //Second handler for .toggle()
		$("div#interfaces_menu_area_fs").next().show();
		$("div#interfaces_menu_area_fs").css({backgroundPosition: "14 -7"});
}

if (interfaces_menu_fs=='collapsed'){
		$("div#interfaces_menu_area_fs").next().hide();
		$("div#interfaces_menu_area_fs").css({backgroundPosition: "14 7"});
}

if(!interfaces_menu_fs){
$.cookie('interfaces_menu_fs','collapsed');	
}


/*---------------flexible  communications-----------*/

if (flexible_menu_fs=='expanded'){
	 //Second handler for .toggle()
		$("div#flexible_menu_area_fs").next().show();
		$("div#flexible_menu_area_fs").css({backgroundPosition: "14 -7"});
}

if (flexible_menu_fs=='collapsed'){
		$("div#flexible_menu_area_fs").next().hide();
		$("div#flexible_menu_area_fs").css({backgroundPosition: "14 7"});
}

if(!flexible_menu_fs){
$.cookie('flexible_menu_fs','collapsed');	
}


/*---------------advanced automated processes-----------*/

if (advanced_menu_fs=='expanded'){
	 //Second handler for .toggle()
		$("div#advanced_menu_area_fs").next().show();
		$("div#advanced_menu_area_fs").css({backgroundPosition: "14 -7"});
}

if (advanced_menu_fs=='collapsed'){
		$("div#advanced_menu_area_fs").next().hide();
		$("div#advanced_menu_area_fs").css({backgroundPosition: "14 7"});
}

if(!advanced_menu_fs){
$.cookie('advanced_menu_fs','collapsed');	
}


/*---------------setup-----------*/

if (setup_menu_fs=='expanded'){
	 //Second handler for .toggle()
		$("div#setup_menu_area_fs").next().show();
		$("div#setup_menu_area_fs").css({backgroundPosition: "14 -7"});
}

if (setup_menu_fs=='collapsed'){
		$("div#setup_menu_area_fs").next().hide();
		$("div#setup_menu_area_fs").css({backgroundPosition: "14 7"});
}

if(!setup_menu_fs){
$.cookie('setup_menu_fs','collapsed');	
}

/*---------------products supported-----------*/

if (supported_menu_fs=='expanded'){
	 //Second handler for .toggle()
		$("div#supported_menu_area_fs").next().show();
		$("div#supported_menu_area_fs").css({backgroundPosition: "14 -7"});
}

if (supported_menu_fs=='collapsed'){
		$("div#supported_menu_area_fs").next().hide();
		$("div#supported_menu_area_fs").css({backgroundPosition: "14 7"});
}

if(!supported_menu_fs){
$.cookie('supported_menu_fs','collapsed');	
}




/*-------define click events--------*/



/*----------------all menu areas------------------*/

if(all_menu_areas_fs=='collapsed'||!all_menu_areas_fs){

$('#all_menus_fs').toggle(function() {
 
$.cookie('all_menu_areas_fs', 'expanded');
$(this).next().show();
$(this).css({backgroundPosition: "4 -7"});

}
, function() {

$.cookie('all_menu_areas_fs', 'collapsed');
$(this).next().hide();	
$(this).css({backgroundPosition: "4 7"});	
});
}

if(all_menu_areas_fs=='expanded'){
 
 
$('#all_menus_fs').toggle(function() {
//window.location="index.php?pageID=239";								
$.cookie('all_menu_areas_fs', 'collapsed');
$(this).next().hide();
$(this).css({backgroundPosition: "4 7"});
}
, function() {
//window.location="index.php?pageID=239";		
 $.cookie('all_menu_areas_fs', 'expanded');
 $(this).next().show();	
 		$(this).css({backgroundPosition: "4 -7"});
});
}




/*----------------interfaces------------------*/

if(interfaces_menu_fs=='collapsed'||!interfaces_menu_fs){

$('#interfaces_menu_area_fs').toggle(function() {
 $.cookie('interfaces_menu_fs', 'expanded');
 $(this).next().show();
$(this).css({backgroundPosition: "14 -7"});
}
, function() {
$.cookie('interfaces_menu_fs', 'collapsed');
$(this).next().hide();	
$(this).css({backgroundPosition: "14 7"});
});
}

if(interfaces_menu_fs=='expanded'){

$('#interfaces_menu_area_fs').toggle(function() {
$.cookie('interfaces_menu_fs', 'collapsed');
$(this).next().hide();
$(this).css({backgroundPosition: "14 7"});
}
, function() {
	
 $.cookie('interfaces_menu_fs', 'expanded');
 $(this).next().show();	
$(this).css({backgroundPosition: "14 -7"});
});
}




/*----------------flexible------------------*/

if(flexible_menu_fs=='collapsed'||!flexible_menu_fs){

$('#flexible_menu_area_fs').toggle(function() {
 $.cookie('flexible_menu_fs', 'expanded');
 $(this).next().show();
 $(this).css({backgroundPosition: "14 -7"});
}
, function() {
$.cookie('flexible_menu_fs', 'collapsed');
$(this).next().hide();	
$(this).css({backgroundPosition: "14 7"});		
});
}

if(flexible_menu_fs=='expanded'){

$('#flexible_menu_area_fs').toggle(function() {
$.cookie('flexible_menu_fs', 'collapsed');
$(this).next().hide();
 $(this).css({backgroundPosition: "14 7"});
}
, function() {
	
 $.cookie('flexible_menu_fs', 'expanded');
 $(this).next().show();	
  $(this).css({backgroundPosition: "14 -7"});
});
}


/*----------------advanced------------------*/
//automated processing
if(advanced_menu_fs=='collapsed'||!advanced_menu_fs){

$('#advanced_menu_area_fs').toggle(function() {
 $.cookie('advanced_menu_fs', 'expanded');
 $(this).next().show();
  $(this).css({backgroundPosition: "14 -7"});

}
, function() {
$.cookie('advanced_menu_fs', 'collapsed');
$(this).next().hide();	
	$(this).css({backgroundPosition: "14 7"});	
});
}

if(advanced_menu_fs=='expanded'){

$('#advanced_menu_area_fs').toggle(function() {
$.cookie('advanced_menu_fs', 'collapsed');
$(this).next().hide();
$(this).css({backgroundPosition: "14 7"});
}
, function() {
	
 $.cookie('advanced_menu_fs', 'expanded');
 $(this).next().show();	
  $(this).css({backgroundPosition: "14 -7"});
});
}




/*----------------setup------------------*/
//setup
if(setup_menu_fs=='collapsed'||!setup_menu_fs){

$('#setup_menu_area_fs').toggle(function() {
 $.cookie('setup_menu_fs', 'expanded');
 $(this).next().show();
 $(this).css({backgroundPosition: "14 -7"});
}
, function() {
$.cookie('setup_menu_fs', 'collapsed');
$(this).next().hide();	
$(this).css({backgroundPosition: "14 7"});	
});
}

if(setup_menu_fs=='expanded'){

$('#setup_menu_area_fs').toggle(function() {
$.cookie('setup_menu_fs', 'collapsed');
$(this).next().hide();
$(this).css({backgroundPosition: "14 7"});
}
, function() {
	
 $.cookie('setup_menu_fs', 'expanded');
 $(this).next().show();	
 $(this).css({backgroundPosition: "14 -7"});
});
}


/*----------------supported------------------*/
//setup
if(supported_menu_fs=='collapsed'||!supported_menu_fs){

$('#supported_menu_area_fs').toggle(function() {
 $.cookie('supported_menu_fs', 'expanded');
 $(this).next().show();
 $(this).css({backgroundPosition: "14 -7"});
}
, function() {
$.cookie('supported_menu_fs', 'collapsed');
$(this).next().hide();	
$(this).css({backgroundPosition: "14 7"});	
});
}

if(supported_menu_fs=='expanded'){

$('#supported_menu_area_fs').toggle(function() {
$.cookie('supported_menu_fs', 'collapsed');
$(this).next().hide();
$(this).css({backgroundPosition: "14 7"});
}
, function() {
	
 $.cookie('supported_menu_fs', 'expanded');
 $(this).next().show();	
 $(this).css({backgroundPosition: "14 -7"});
});
}




/*-------set hover state and cursor----------*/	
$("div.menu_area_fs, div.all_menu_areas_container_fs").hover(function(){
									   $(this).css("cursor", "pointer");
									   $(this).css("background-color", "#F9F9F9");
									  
									   $(this).css("color","#E89517");
									   },function(){
										 $(this).css("cursor", "auto");
										 $(this).css("background-color", "#ffffff");
										$(this).css("background-color", "transparent");
										 $(this).css("color","#666666");
									   }
									   )

									}


