$(".home .thumbvids .vid").hover(function() {
	$(this).find(".shade").stop().animate({ opacity: 1 });
	$(this).find("a").stop().animate({ opacity: 1 });
}, function() {
	$(this).find(".shade").stop().animate({ opacity: 0 });
	$(this).find("a").stop().animate({ opacity: 0 });
});

$("#helpopena").click(function() {
	$("#fullshade, #helpopen").show().animate({ opacity: 1 });
	return false;
});
$("#fullshade").click(function() {
	$("#fullshade, #helpopen").animate({ opacity: 0 }, function() {
		$(this).hide();
	});
});

$("#helpopen input").bind('keypress', function(e) {
	if (e.keyCode==13) {
		var typed = $("#helpopen input").val();
		$("#openresult").hide(0,function() { $(this).remove(); } );
		$("#aniloa").show().animate({ opacity: 1 });

		$.get('/wp-content/themes/kymt/style/js/filetypes.xml', function(d) {
			$(d).find('ext').each(function() {

				var $ext = $(this);
				var curext = $ext.attr("type");
				var curtext = $ext.text();

				if (typed == curext) {
					$("#helpopen div div").append("<p id='openresult'><strong>A ."+typed+" file...</strong><br />"+curtext+"</p>");
					return false;
				}
	
			});
		});
		
		$("#aniloa").animate({ opacity: 0 }, function() { $(this).hide(); })
	}
});
