function table_calcs_select() {
  jQuery("#extensive_product_list tr").hover(function(){
      jQuery(this).addClass('hover');
    }, function() {
      jQuery(this).removeClass('hover');
    });
}

function link_click() {
jQuery("a").filter(".linkpre").click(function(){
	ttop=0;
	if( typeof( window.innerWidth ) == 'number' ) {
		//Non-IE
		myWidth = window.innerWidth;
		myHeight = window.innerHeight;
		ttop=window.pageYOffset;
	} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
		//IE 6+ in 'standards compliant mode'
		myWidth = document.documentElement.clientWidth;
		myHeight = document.documentElement.clientHeight;
		ttop=document.documentElement.scrollTop;
	} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
		//IE 4 compatible
		myWidth = document.body.clientWidth;
		myHeight = document.body.clientHeight;
		ttop=document.body.scrollTop;
	}

	l = (myWidth-200)/2;
	t = (myHeight-50)/2+ttop ; 
	
    document.getElementById('loading').style.top = t+'px';
    document.getElementById('loading').style.left = l+'px';
    document.getElementById('overlay-ajax').style.height = document.getElementById('all_content').offsetHeight+'px';
	document.getElementById('overlay-ajax').style.display = "block";
  });  
}


function power_dropdowns() {
	jQuery(".dropdown_chooser .all_options").each(function(){
		
		if (jQuery(this).children().size() < 12) {
		jQuery(this).css("width", "180px");
		} else if (jQuery(this).children().size() > 30) {
		jQuery(this).css("width", "573px");
		}
	});
	
	/*
	jQuery('.current_option a').click(function(){
	return false;
	});
	
	
	jQuery('.dropdown_chooser').hover(function(){
	jQuery(this).children('.all_options').addClass('hidden_options');
	}, function(){
	jQuery(this).children('.all_options').removeClass('hidden_options');
	});
	*/
	
	jQuery('.dropdown_chooser .all_options a').click(function(){
		jQuery(this).removeClass('hidden_options');
	});

	jQuery('.dropdown_chooser').click(function(){
		jQuery(this).children('.all_options').addClass('hidden_options');
	});	
	
	jQuery('.dropdown_chooser').hover(function(){
	}, function(){
	jQuery(this).children('.all_options').removeClass('hidden_options');
	});
}


jQuery(function($) {
  table_calcs_select();
  power_dropdowns();
  link_click();
  
  jQuery("#nav-bancare, #nav-bancare-categories").hover(function(){
		jQuery('#nav-bancare-categories').css('display', 'block');
	}, function(){
		jQuery('#nav-bancare-categories').css('display', 'none');
	});
	
	//calculatoare
	//1 | btn-calc1
	jQuery("#btn-calc1").click(function(){
		jQuery("#valoare_imprumutc").css("display", "block");
	}, function(){
		jQuery("#valoare_imprumutc").css("display", "none");
	});
	jQuery('#valoare_imprumutc').hover(function(){
		jQuery("#valoare_imprumutc").css("display", "block");
	}, function(){
		jQuery("#valoare_imprumutc").css("display", "none");
	});	
	jQuery('#btn-calc1').hover(function(){
	}, function(){
		jQuery("#valoare_imprumutc").css("display", "none");
	});	
	//2 | btn-calc2 
	jQuery("#btn-calc2").click(function(){
		jQuery("#alege_perioadac").css("display", "block");
	}, function(){
		jQuery("#alege_perioadac").css("display", "none");
	});
	jQuery('#alege_perioadac').hover(function(){
		jQuery("#alege_perioadac").css("display", "block");
	}, function(){
		jQuery("#alege_perioadac").css("display", "none");
	});	
	jQuery('#btn-calc2').hover(function(){
	}, function(){
		jQuery("#alege_perioadac").css("display", "none");
	});				
	//3 | btn-calc3 
	jQuery("#btn-calc3").click(function(){
		jQuery("#alege_moneda").css("display", "block");
	}, function(){
		jQuery("#alege_moneda").css("display", "none");
	});
	jQuery('#alege_moneda').hover(function(){
		jQuery("#alege_moneda").css("display", "block");
	}, function(){
		jQuery("#alege_moneda").css("display", "none");
	});	
	jQuery('#btn-calc3').hover(function(){
	}, function(){
		jQuery("#alege_moneda").css("display", "none");
	});
	//4 | btn-calc4 
	jQuery("#btn-calc4").click(function(){
		jQuery("#alege_credit").css("display", "block");
	}, function(){
		jQuery("#alege_credit").css("display", "none");
	});
	jQuery('#alege_credit').hover(function(){
		jQuery("#alege_credit").css("display", "block");
	}, function(){
		jQuery("#alege_credit").css("display", "none");
	});	
	jQuery('#btn-calc4').hover(function(){
	}, function(){
		jQuery("#alege_credit").css("display", "none");
	});
	//5 | btn-calc5 
	jQuery("#btn-calc5").click(function(){
		jQuery("#alege_rate").css("display", "block");
	}, function(){
		jQuery("#alege_rate").css("display", "none");
	});
	jQuery('#alege_rate').hover(function(){
		jQuery("#alege_rate").css("display", "block");
	}, function(){
		jQuery("#alege_rate").css("display", "none");
	});	
	jQuery('#btn-calc5').hover(function(){
	}, function(){
		jQuery("#alege_rate").css("display", "none");
	});	
	//6 | btn-calc6
	jQuery("#btn-calc6").click(function(){
		jQuery("#alege_valoareproprietate").css("display", "block");
	}, function(){
		jQuery("#alege_valoareproprietate").css("display", "none");
	});
	jQuery('#alege_valoareproprietate').hover(function(){
		jQuery("#alege_valoareproprietate").css("display", "block");
	}, function(){
		jQuery("#alege_valoareproprietate").css("display", "none");
	});	
	jQuery('#btn-calc6').hover(function(){
	}, function(){
		jQuery("#alege_valoareproprietate").css("display", "none");
	});	
//actiune pentru DEPOZITE
	//7 | btn-calc7
	jQuery("#btn-calc7").click(function(){
		jQuery("#valoare_depozit").css("display", "block");
	}, function(){
		jQuery("#valoare_depozit").css("display", "none");
	});
	jQuery('#valoare_depozit').hover(function(){
		jQuery("#valoare_depozit").css("display", "block");
	}, function(){
		jQuery("#valoare_depozit").css("display", "none");
	});	
	jQuery('#btn-calc7').hover(function(){
	}, function(){
		jQuery("#valoare_depozit").css("display", "none");
	});	
	//8 | btn-calc8
	jQuery("#btn-calc8").click(function(){
		jQuery("#alege_moneda_depozit").css("display", "block");
	}, function(){
		jQuery("#alege_moneda_depozit").css("display", "none");
	});
	jQuery('#alege_moneda_depozit').hover(function(){
		jQuery("#alege_moneda_depozit").css("display", "block");
	}, function(){
		jQuery("#alege_moneda_depozit").css("display", "none");
	});	
	jQuery('#btn-calc8').hover(function(){
	}, function(){
		jQuery("#alege_moneda_depozit").css("display", "none");
	});	
	//9 | btn-calc9
	jQuery("#btn-calc9").click(function(){
		jQuery("#alege_dobanda_depozit").css("display", "block");
	}, function(){
		jQuery("#alege_dobanda_depozit").css("display", "none");
	});
	jQuery('#alege_dobanda_depozit').hover(function(){
		jQuery("#alege_dobanda_depozit").css("display", "block");
	}, function(){
		jQuery("#alege_dobanda_depozit").css("display", "none");
	});	
	jQuery('#btn-calc9').hover(function(){
	}, function(){
		jQuery("#alege_dobanda_depozit").css("display", "none");
	});	
	//10 | btn-calc10
	jQuery("#btn-calc10").click(function(){
		jQuery("#alege_termen_depozit").css("display", "block");
	}, function(){
		jQuery("#alege_termen_depozit").css("display", "none");
	});
	jQuery('#alege_termen_depozit').hover(function(){
		jQuery("#alege_termen_depozit").css("display", "block");
	}, function(){
		jQuery("#alege_termen_depozit").css("display", "none");
	});	
	jQuery('#btn-calc10').hover(function(){
	}, function(){
		jQuery("#alege_termen_depozit").css("display", "none");
	});	
	//11 | btn-calc11
	jQuery("#btn-calc11").click(function(){
		jQuery("#alege_capitalizare_depozit").css("display", "block");
	}, function(){
		jQuery("#alege_capitalizare_depozit").css("display", "none");
	});
	jQuery('#alege_capitalizare_depozit').hover(function(){
		jQuery("#alege_capitalizare_depozit").css("display", "block");
	}, function(){
		jQuery("#alege_capitalizare_depozit").css("display", "none");
	});	
	jQuery('#btn-calc11').hover(function(){
	}, function(){
		jQuery("#alege_capitalizare_depozit").css("display", "none");
	});	
	//12 | btn-calc12 pag.2(5){1-4 ~ pag1}
	jQuery("#btn-calc12").click(function(){
		jQuery("#valoare_propmax").css("display", "block");
	}, function(){
		jQuery("#valoare_propmax").css("display", "none");
	});
	jQuery('#valoare_propmax').hover(function(){
		jQuery("#valoare_propmax").css("display", "block");
	}, function(){
		jQuery("#valoare_propmax").css("display", "none");
	});	
	jQuery('#btn-calc12').hover(function(){
	}, function(){
		jQuery("#valoare_propmax").css("display", "none");
	});		
	//13 | btn-calc13}
	jQuery("#btn-calc13").click(function(){
		jQuery("#alege_termen_depeco").css("display", "block");
	}, function(){
		jQuery("#alege_termen_depeco").css("display", "none");
	});
	jQuery('#alege_termen_depeco').hover(function(){
		jQuery("#alege_termen_depeco").css("display", "block");
	}, function(){
		jQuery("#alege_termen_depeco").css("display", "none");
	});	
	jQuery('#btn-calc13').hover(function(){
	}, function(){
		jQuery("#alege_termen_depeco").css("display", "none");
	});	
	//14 | btn-calc14}
	jQuery("#btn-calc14").click(function(){
		jQuery("#alege_capitalizare_depeco").css("display", "block");
	}, function(){
		jQuery("#alege_capitalizare_depeco").css("display", "none");
	});
	jQuery('#alege_capitalizare_depeco').hover(function(){
		jQuery("#alege_capitalizare_depeco").css("display", "block");
	}, function(){
		jQuery("#alege_capitalizare_depeco").css("display", "none");
	});	
	jQuery('#btn-calc14').hover(function(){
	}, function(){
		jQuery("#alege_capitalizare_depeco").css("display", "none");
	});	
	//15 | btn-calc15}
	jQuery("#btn-calc15").click(function(){
		jQuery("#alege_aria_card").css("display", "block");
	}, function(){
		jQuery("#alege_aria_card").css("display", "none");
	});
	jQuery('#alege_aria_card').hover(function(){
		jQuery("#alege_aria_card").css("display", "block");
	}, function(){
		jQuery("#alege_aria_card").css("display", "none");
	});	
	jQuery('#btn-calc15').hover(function(){
	}, function(){
		jQuery("#alege_aria_card").css("display", "none");
	});	
	//16 | btn-calc16}
	jQuery("#btn-calc16").click(function(){
		jQuery("#alege_marca_card").css("display", "block");
	}, function(){
		jQuery("#alege_marca_card").css("display", "none");
	});
	jQuery('#alege_marca_card').hover(function(){
		jQuery("#alege_marca_card").css("display", "block");
	}, function(){
		jQuery("#alege_marca_card").css("display", "none");
	});	
	jQuery('#btn-calc16').hover(function(){
	}, function(){
		jQuery("#alege_marca_card").css("display", "none");
	});	
	//17 | btn-calc17}
	jQuery("#btn-calc17").click(function(){
		jQuery("#alege_tip_card").css("display", "block");
	}, function(){
		jQuery("#alege_tip_card").css("display", "none");
	});
	jQuery('#alege_tip_card').hover(function(){
		jQuery("#alege_tip_card").css("display", "block");
	}, function(){
		jQuery("#alege_tip_card").css("display", "none");
	});	
	jQuery('#btn-calc17').hover(function(){
	}, function(){
		jQuery("#alege_tip_card").css("display", "none");
	});	
	//18 | btn-calc18}
	jQuery("#btn-calc18").click(function(){
		jQuery("#alege_moneda_card").css("display", "block");
	}, function(){
		jQuery("#alege_moneda_card").css("display", "none");
	});
	jQuery('#alege_moneda_card').hover(function(){
		jQuery("#alege_moneda_card").css("display", "block");
	}, function(){
		jQuery("#alege_moneda_card").css("display", "none");
	});	
	jQuery('#btn-calc18').hover(function(){
	}, function(){
		jQuery("#alege_moneda_card").css("display", "none");
	});					
	//19 | btn-calc19}
	jQuery("#btn-calc19").click(function(){
		jQuery("#alege_comp_card").css("display", "block");
	}, function(){
		jQuery("#alege_comp_card").css("display", "none");
	});
	jQuery('#alege_comp_card').hover(function(){
		jQuery("#alege_comp_card").css("display", "block");
	}, function(){
		jQuery("#alege_comp_card").css("display", "none");
	});	
	jQuery('#btn-calc19').hover(function(){
	}, function(){
		jQuery("#alege_comp_card").css("display", "none");
	});	
	//20 | btn-calc20}
	jQuery("#btn-calc20").click(function(){
		jQuery("#alege_comp_fondinvest").css("display", "block");
	}, function(){
		jQuery("#alege_comp_fondinvest").css("display", "none");
	});
	jQuery('#alege_comp_fondinvest').hover(function(){
		jQuery("#alege_comp_fondinvest").css("display", "block");
	}, function(){
		jQuery("#alege_comp_fondinvest").css("display", "none");
	});	
	jQuery('#btn-calc20').hover(function(){
	}, function(){
		jQuery("#alege_comp_fondinvest").css("display", "none");
	});	
	//21 | btn-calc21}
	jQuery("#btn-calc21").click(function(){
		jQuery("#alege_comp_fondpensii").css("display", "block");
	}, function(){
		jQuery("#alege_comp_fondpensii").css("display", "none");
	});
	jQuery('#alege_comp_fondpensii').hover(function(){
		jQuery("#alege_comp_fondpensii").css("display", "block");
	}, function(){
		jQuery("#alege_comp_fondpensii").css("display", "none");
	});	
	jQuery('#btn-calc21').hover(function(){
	}, function(){
		jQuery("#alege_comp_fondpensii").css("display", "none");
	});
	//22 | btn-calc22}
	jQuery("#btn-calc22").click(function(){
		jQuery("#alege_leasing").css("display", "block");
	}, function(){
		jQuery("#alege_leasing").css("display", "none");
	});
	jQuery('#alege_leasing').hover(function(){
		jQuery("#alege_leasing").css("display", "block");
	}, function(){
		jQuery("#alege_leasing").css("display", "none");
	});	
	jQuery('#btn-calc22').hover(function(){
	}, function(){
		jQuery("#alege_leasing").css("display", "none");
	});
	//23 | btn-calc23}
	jQuery("#btn-calc23").click(function(){
		jQuery("#alege_asigurare").css("display", "block");
	}, function(){
		jQuery("#alege_asigurare").css("display", "none");
	});
	jQuery('#alege_asigurare').hover(function(){
		jQuery("#alege_asigurare").css("display", "block");
	}, function(){
		jQuery("#alege_asigurare").css("display", "none");
	});	
	jQuery('#btn-calc23').hover(function(){
	}, function(){
		jQuery("#alege_asigurare").css("display", "none");
	});	
	//24 | btn-calc24}
	jQuery("#btn-calc24").click(function(){
		jQuery("#alege_sum_fondinvest").css("display", "block");
	}, function(){
		jQuery("#alege_sum_fondinvest").css("display", "none");
	});
	jQuery('#alege_sum_fondinvest').hover(function(){
		jQuery("#alege_sum_fondinvest").css("display", "block");
	}, function(){
		jQuery("#alege_sum_fondinvest").css("display", "none");
	});	
	jQuery('#btn-calc24').hover(function(){
	}, function(){
		jQuery("#alege_sum_fondinvest").css("display", "none");
	});		
//dropdown banci
/*
	jQuery(".dropdownc ul").each(function(){
		if(jQuery(this).children('li').size() < 12) {
			jQuery(this).css("width", "238px");
		} else if(jQuery(this).children('li').size() < 24) {
			jQuery(this).css("width", "476px");
		}		
	});
*/		
	//24 | btn-calc24}
	jQuery("#toatebancile").click(function(){
		jQuery("#dd_calc").css("display", "block");
	}, function(){
		jQuery("#dd_calc").css("display", "none");
	});
	jQuery('#dd_calc').hover(function(){
		jQuery("#dd_calc").css("display", "block");
	}, function(){
		jQuery("#dd_calc").css("display", "none");
	});	
	jQuery('#toatebancile').hover(function(){
	}, function(){
		jQuery("#dd_calc").css("display", "none");
	});		
/*	
	jQuery(".dropdownc").click(function(){
		jQuery(this).addClass("selected");
	}, function(){
		jQuery(this).removeClass("selected");
	});
	jQuery('.dropdownc .selected').hover(function(){
		//jQuery("#alege_comp_fondpensii").css("display", "block");
	}, function(){
		jQuery(this).removeClass("selected");
	});	
	jQuery('.dropdownc').hover(function(){
	}, function(){
		jQuery(this).removeClass("selected");
	});	
*/	
//new dd banci	
/*
	jQuery(".dropdownc").click(function(){
		jQuery("#ddbank").css("display", "block");
	}, function(){
		jQuery("#ddbank").css("display", "none");
	});
	jQuery('#ddbank').hover(function(){
		jQuery("#ddbank").css("display", "block");
	}, function(){
		jQuery("#ddbank").css("display", "none");
	});	
	jQuery('.dropdownc').hover(function(){
	}, function(){
		jQuery("#ddbank").css("display", "none");
	});	
*/	
});
