$(document).ready(function() {

	$("a[rel='external']")
		.click(function() {
			window.open($(this).attr("href"));
			return false;
		});

	$("#twitter")
		.after("<div></div>")
		.next()
		.getTwitter({
			userName: "nachopops",
			numTweets: 4,
			loaderText: "",
			slideIn: false,
			slideDuration: 0,
			showHeading: false,
			showProfileLink: false,
			showTimestamp: false
		});

	$("#youtube a")
		.each(function() {
			$this = $(this);
			$img = $(this).find("img");
			$id = $img.attr("alt");
			$img.attr("alt", "");

			$this
				.attr("href", "#" + $id)
				.fancybox({
					overlayOpacity: 0.75, 
					frameWidth: 480, 
					frameHeight: 385
				});
		});

	$("#youtube li")
		.quickpaginate({
			perpage: 8, 
			showcounter: false, 
			pager: $("#youtube_page")
		});

	$("#music a[href$='.mp3']")
		.each(function() {
			$this = $(this);
			$mp3 = $this.attr("href");
			$this.after("<br /><span class=\"mp3\">" + $mp3 + "</span>");
		});

	$("#music .mp3")
		.jmp3({
		backcolor: "AAAAAA",
		forecolor: "333333",
		width: 250,
		showfilename: "false"
	});

	$("#categories a, #archive a")
		.prepend("<em>&gt;&gt;</em> ");

/*
	$("#contact_form")
		.submit(function() {
			$this = $(this);
			$data = $this.serialize();

			$('#notify', $this)
				.attr('href', $this.attr("action") + '?' + $data)
				.fancybox({
					overlayOpacity: 0.85,
					frameWidth: 400, 
					frameHeight: 90
				})
				.click();

			return false;

		});
*/

});

