
/*----------------------------------------*/  				  
/*----------------------------------------*/  				  
// jQuery
/*----------------------------------------*/  				  
/*----------------------------------------*/

$(document).ready(function() {
						   
/*----------------------------------------*/  				  
/*----------------------------------------*/  				  
// JQUERY Sandbox 
/*----------------------------------------*/  				  
/*----------------------------------------*/  				  



/*----------------------------------------*/  				  
/*----------------------------------------*/  				  
// End JQUERY Sandbox 
/*----------------------------------------*/  				  
/*----------------------------------------*/  



$(".tooltip-link").click(
function () {
var position = {};
$(this).position(position);
position.top=position.top-$(this).height()+10;
position.left=position.left-50;
$("#page-content").find(".tooltip-box").hide();
$("#page-content").find(".dropShadow").remove();
$(this).parent().find(".tooltip-box").css(position).fadeIn(500, function () {
						 $(this).dropShadow({left:0,top:0});
					 });
      return false;
}
); 


/*----------------------------------------*/  				  
// CLOSE 
/*----------------------------------------*/  				  

$(".close-link").each(function (c) {
$(this).click(function () {
$(this).parent().hide().removeShadow();
$("#page-content").find(".dropShadow").remove();
						return false;
						})
});
/*----------------------------------------*/  				  
// CLOSE 
/*----------------------------------------*/  				  





/*----------------------------------------*/  				  
// HIDDEN TEXT 
/*----------------------------------------*/  				  
$("a#itm-studia").click(
	function () {
//$(this).parent().find(".submenu").toggle("slow");
$(this).parent().find(".submenu").fadeIn("slow");
$(this).addClass("selected");
});

$("a#fai-domanda").click(
	function () {
//$(this).parent().find(".submenu").toggle("slow");
$(this).parent().fadeOut("slow");
$(this).parent().parent().find(".submenu").fadeIn("slow");
$(this).addClass("selected");
});


$(".hidden-text").append("<div class='close-ht'><span class='botlf'></span><span class='botrg'></span><span class='close-span'>Chiudi</span></div>");
$(".hidden-text").children(".shlk-bkg").find("a").prepend("<span class='botlf'><span class='toplf'></span></span>");
$(".hidden-text").children(".shlk-bkg").find("a").append("<span class='botrg'><span class='toprg'></span></span>");

$("li.TabbedPanelsTab").prepend("<span class='toplf'></span>");
$("li.TabbedPanelsTab").append("<span class='toprg'></span>");


$(".hidden-text .shlk").click(
	function () {
//$(this).addClass('opened');
$(this).parent().parent().addClass('opened');
$(this).parent().css({"margin-bottom":"10px"});
				$(this).parent().parent().children("*").each(function (i) {
				$(this).find("*").fadeIn("slow");
				$(this).fadeIn("slow");
				$(this).css({"display":"block"});
				
$(".hide").each(function (d) {
$(this).hide();});
});
});

$(".close-ht").click(
	function () {
$(this).parent().children("*").not(".shlk, .shlk-bkg").slideUp('fast', function (wait) {
//$(this).parent().children(".shlk-bkg").find("a").removeClass('opened');});
$(this).parent().removeClass('opened');});
});

$("#menu-backoffice h2").toggle(
	function () {
$(this).parent().children("ul").slideDown();
},
	function () {
$(this).parent().children("ul").slideUp();
});

$("#menu-backoffice dt").parent().parent("li").addClass("dlist");


$("#menu-backoffice dt").toggle(
	function () {
$(this).parent().children("dd").fadeIn();
$(this).parent().parent("li").toggleClass("min");
},
	function () {
$(this).parent().children("dd").hide();
$(this).parent().parent("li").toggleClass("min");
});


/*----------------------------------------*/
//	Closing jQuery
/*----------------------------------------*/  

	});
