$(document).ready(function(){   
    // Set tooltips
    $(".HelpIcon").tooltip({
        showURL: false,
        extraClass: "HelpIconToolTip",
        showBody: " - "
    });
    
    $(".Info").tooltip({
        showURL: false,
        showBody: " - "
    });
    
    //Set tabs
    $("#Tabs").tabs();   
    
    //Set menu
    $("#Menu ul").droppy({speed: 10});  
    
	// Check for closed filter blocks
	$(".Toggle").each(function() {
		if($(this).next().is(":hidden"))
		{
		   $(this).next(".ToggleContent").hide();
		   $(this).children("a").addClass("ToggleClosed");
		}
	});

	// Toggle filter blocks
	$(".Toggle").click(function() {
		if($(this).next().is(":visible")) {
			$(this).next(".ToggleContent").hide();
			$(this).children("a").addClass("ToggleClosed");
		} else {
			$(this).next(".ToggleContent").show();
			$(this).children("a").removeClass("ToggleClosed");
		}
	});
	
	// Select all on the textboxes
	$("input").focus(function(){
        $(this).select();
    });
          
});