// remap jQuery to $
(function($){

	/* trigger when page is ready */
	$(document).ready(function (){
		
		// Header slide
	    $("#header-slide ul").cycle({
	    	fx: 	"fade",
	    	speed:	500
	    });
		
		// Menu
	    $("ul.drop-menu").superfish({
	    	animation:   {height:"show"},
	    	delay:	 	 10,
	    	dropShadows: false,
	    	speed:       "fast"
	    });
	    
	    // Home slide
	    $("#slide ul#slide-images, #slide #description").cycle({
	    	delay:  5000,
	    	fx: 	"fade",
	    	next:	"#slide-next",
	    	prev:	"#slide-prev",
	    	speed:	800
	    });
	    
	    // Deletando margin da direita dos elementos nescessários
	    $("#noticias article:nth-child(2n), #content #search article:odd, #galeria figure:nth-child(3n), .diretoria .page ul li:nth-child(4n)").css("margin-right", 0);
	
		/* Accordion
		$( "#cub article h3" ).click(function() {
			$(this).next().toggle('height');
			return false;
		}).next().hide();*/ 
		
		$("#cub, #convencao, #curriculum").accordion({
			header: "h3",
			autoHeight: false,
			navigation: true
		});
		
		// input file
		$("input[type=file]").filestyle({ 
			image: "http://www.sindusconitapema.com.br/wp-content/themes/sinduscon/_/images/button.jpg",
			imageheight : 27,
			imagewidth : 142,
			width : 355
		});
	});

})(window.jQuery);

/* optional triggers
$(window).load(function() {
	
});
$(window).resize(function() {
	
});
*/
