﻿var linkGroups = ["footer"];
$(document).ready(function() {
    $("#toolTip").hide();

    $("#footer .onlinep").hover(
		function() { $("#toolTip").fadeIn("fast"); },
		function() { $("#toolTip").fadeOut("fast"); }
	);

    /* FancyBox */
    if ($('a.imgFancy').length) { // if exist
        $("a.imgFancy").fancybox();
    };
    if ($('a.imgLoja').length) { // if exist
        $("a.imgLoja").fancybox();
    };
    
    $('#aCurso').click(function(e) {
        e.preventDefault();
        $('.fCurso').slideDown(1000);
        $('.fCurso').css('display', 'block');
    });

    //Raised after all content on the page is refreshed
    Sys.WebForms.PageRequestManager.getInstance().add_pageLoaded(pageLoaded);
    //Raised after the response from the server to an asynchronous postback
    Sys.WebForms.PageRequestManager.getInstance().add_pageLoading(pageLoadingHandler);
});

// MENU AJAX
$.fn.hoverClass = function(c) {
    return this.each(function() {
        $(this).hover(
		        function() { $(this).addClass(c); },
		        function() { $(this).removeClass(c); }
	        );
    });
};

// LOAD FUNCTION OF CATEGORY
function pageLoaded(sender, args) { ActiveFunction(); }
function pageLoadingHandler(sender, args) { ActiveFunction(); }
function ActiveFunction() {
    $(".txbPesq").focus(function() { $(this).val(""); });
    $(".txbPesq").blur(function() {
        if ($(this).val() == "") {
            $(this).val("Pesquisar");
        }
    });
}