// ******* JS for italwin.it ********
// ***********************************************


// temp hide
//    $(document).ready(function(){
//		$(".categories_table img").hide();
//	});
	
	Cufon.replace('#header_menu_container a, .bb_title, .content_title, .content_title_month, .table_cat_header, .but_scheda, .resellers_title_prov', {
//	Cufon.replace('#header_menu_container a, .bb_title, .content_title, .content_title_month, .table_cat_header, #scheda_menu, .but_scheda', {				  
		hover: true
	});

    $(document).ready(function(){
							   
// ** mainmenu manager **		

		$(".mainmenu_lv2").hide();
		$(".withsubmenu").mouseover(function () {									  
				$(this).find(".mainmenu_lv2").show(); // mostra il mainmenu_lv2 discendente del tasto attualmente in hover!
		});
		$(".mainmenu_lv2").mouseover(function () {
				$(this).show(); // mantiene visibile il mainmenu_lv2 attualmente aperto
		});	
		$(".mainmenu_elem a").mouseover(function () {
				$(".mainmenu_lv2").hide();
		});							   

// ** reseller login manager **

		$("#login_form, #close_login_form, #password_reminder, #registration_request").hide();
		$("#login_button").click(function () {
			$("#login_form, #close_login_form").show();
		});		
		$("#close_login_form").click(function () {
			$("#login_form, .login_form_subsection, #close_login_form, #forgot_msg").hide();
		});		
		$("#forgotten").click(function () {
			$("#password_reminder").show();
		});		
		$("#unregistered").click(function () {
			$("#registration_request").show();
		});		

// ** bordered_box corner animator**
/*
		$("#poll_questions").mouseover(function() {
			$(this).parent().parent().animate({
//				opacity: 0.25,
//				left: '+=50',
				height: '170'
			}, 500, function() {
				$("#poll_submit").fadeIn(500);
			});
			
		});
*/
		$("#poll_questions input").click(function() {
			$(this).parent().parent().parent().animate({
//				opacity: 0.25,
//				left: '+=50',
				height: '170'
			}, 500, function() {
/*				$("#poll_submit").fadeIn(500);*/
				$("#poll_submit").show();				
/*				$(".active_corner_down").hide(500);*/
			});
			
		});
/*
		$(".active_corner_down").click(function() {
			$(this).parent().animate({
//				opacity: 0.25,
//				left: '+=50',
//				height: '+=50'
				height: '170'
			}, 1000, function() {
				// Animation complete.
			});
			$(this).hide(500, function() {
//				$(this).siblings().show(500);								  
			});
		});
		$(".active_corner_up").click(function() {
			$(this).parent().animate({
//				opacity: 0.25,
//				left: '+=50',
				height: '-=50'
			}, 1000, function() {
				// Animation complete.
			});
			$(this).hide(500, function() {
				$(this).siblings().show(500);								  
			});
		});
		
		$(".active_corner_down, .active_corner_up").hover(
			function () {
				$(this).animate({
					opacity: 0.50
				}, 500);
			},
			function () {
				$(this).animate({
					opacity: 1
				}, 500);
			}
		);		
*/

// ** box dati fiscali **

		$("#italwinsrl").hover(
			function () {
				$("#footer_fisc").show();
			},
			function () {
				$("#footer_fisc").hide();
			}
		);
    });
