	 
$(document).ready(function(){
			
	// Loading ajax
	
		/*$().ajaxStart(function() {
			$('#loading').show();
			$('#loading').fadeTo("fast","0.7");
		});
		
		$().ajaxStop(function() { 
			$('#loading').fadeOut("fast");
		});*/
		
		$('#main').ready(function(){
			$('#loading').show();
			$('#loading').fadeTo("fast","0.5");
			$('#loading').fadeOut("fast");
		});
		
		$('#main').load(function(){
			$('#loading').fadeOut("fast");
		});
	
    //Minimize Content Box
		
		/*$(".content-box-header h3").css({ "cursor":"s-resize" }); // Give the h3 in Content Box Header a different cursor
		$(".closed-box .content-box-content").hide(); // Hide the content of the header if it has the class "closed"
		$(".closed-box .content-box-tabs").hide(); // Hide the tabs in the header if it has the class "closed"
		
		$(".content-box-header h3").click( // When the h3 is clicked...
			function () {
			  $(this).parent().next().toggle(); // Toggle the Content Box
			  $(this).parent().parent().toggleClass("closed-box"); // Toggle the class "closed-box" on the content box
			  $(this).parent().find(".content-box-tabs").toggle(); // Toggle the tabs
			}
		);*/

    // Content box tabs:
		
		$('.content-box .content-box-content div.tab-content').hide(); // Hide the content divs
		$('ul.content-box-tabs li a.default-tab').addClass('current'); // Add the class "current" to the default tab
		$('.content-box-content div.default-tab').show(); // Show the div with class "default-tab"
		
		/*$('.content-box ul.content-box-tabs li a').click( // When a tab is clicked...
			function() { 
				$(this).parent().siblings().find("a").removeClass('current'); // Remove "current" class from all tabs
				$(this).addClass('current'); // Add class "current" to clicked tab
				var currentTab = $(this).attr('href'); // Set variable "currentTab" to the value of href of clicked tab
				$(currentTab).siblings().hide(); // Hide all content divs
				$(currentTab).show(); // Show the content div with the id equal to the id of clicked tab
				return false; 
			}
		);*/

    //Close button:
		
		$("a.close").click(
			function () {
				$(this).parent().fadeTo(400, 0, function () { // Links with the class "close" will close parent
					$(this).slideUp(400);
				});
				return false;
			}
		);

    // Alternating table rows:
		
		$('tbody tr:even').addClass("alt-row"); // Add class "alt-row" to even table rows
        $('tbody tr:odd').addClass("not-alt-row"); // Add class "alt-row" to even table rows
		//$('.fancy-table tbody tr:even').addClass("alt-row"); // Add class "alt-row" to even table rows

    // Check all checkboxes when the one in a table head is checked:
		
		$('.check-all').click(
			function(){
				/*$(this).parent().parent().parent().parent().find("input[type='checkbox']").attr('checked','http://localhost/teste2/js/, $(this).is(\':checked\'));*/   
			}
		);

    // Initialise Facebox Modal window:
		
		//$('a[rel*=modal]').facebox(); // Applies modal window to any link with attribute rel="modal"

    // Initialise jQuery WYSIWYG:
		
		//$(".wysiwyg").wysiwyg(); // Applies WYSIWYG editor to any textarea with the class "wysiwyg"

});
  
  
  
