$(function(){
				$('.nav ul').superfish();
				
				function remove_active(){
					$('#tabs li a').removeClass('active');
				}
				
				//$('#tabs ul li a').click(function(evt){
					//evt.preventDefault();
					//var location = $(this).attr('href');
					//var page_part = $(this).attr('rel');
					//$('#load').load(location + ' #' + page_part, function(){
					//	$('a[href^="http://"]').attr('target', '_blank');
					//});
					//
					//remove_active();
					//$(this).addClass('active');
					//
				//});
				
				//populate resources section
				if ($('a[rel="resources"]').length !== 0 ) {
					$('<div class="article"><h3>Recursos</h3><ul class="links"></ul></div>').appendTo('.aside');
				}
				
				$('a[rel="resources"]').each(function(){
					var title = $(this).attr('title');
					var linkLocation = $(this).attr('href');
					$('<li><a href="'+ linkLocation +'">' + title +'</a></li>').appendTo('.links');
				});
				
				var mylist = $('ul.links');
				var listitems = mylist.children('li').get();
				listitems.sort(function(a, b) {
				   var compA = $(a).text().toUpperCase();
				   var compB = $(b).text().toUpperCase();
				   return (compA < compB) ? -1 : (compA > compB) ? 1 : 0;
				})
				$.each(listitems, function(idx, itm) { mylist.append(itm); });
				
				$('a[href^="http://"]').attr('target', '_blank');
				
				
				//$('.slideshow').cycle({
				//	fx: 'fade'
				//})
				;

				
			});

