$(function () {

	/*** Destaques Links ***/
	
	//Nova Janela
	$(".destaque_link_1").click( function () {
		window.open($(this).attr("href"));
		return false;
	});
	
	//Popup
	$(".destaque_link_2").click( function () {
		$.ajax({
			url: $(this).attr("href"),
			success: function (data) {
				$("#pop.popup").fadeIn().find("#myContent").html(data);
			}
		});
		return false;
	});
	
	//Filme Popup
	$(".destaque_link_3").click( function () {
		data = 	$("<embed></embed>").attr({
					height: "360",
					width: "670",
					type: "application/x-shockwave-flash",
					src: "/temas/comporta/player.swf?movie=" + $(this).attr("href"),
					wmode: "transparent"
				});
		$("#pop.popup").fadeIn().find("#myContent").html("").append(data);
		return false;
	});

	$(".destaque_link_4").click( function () {
		data = 	$("<embed></embed>").attr({
					height: "360",
					width: "670",
					type: "application/x-shockwave-flash",
					src: "http://www.youtube.com/v/" + $(this).attr("href"),
					wmode: "transparent"
				});
		$("#pop.popup").fadeIn().find("#myContent").html("").append(data);
		return false;
	});

	
	$("#pop.popup #closeMe").click( function () {
		$(this).closest("#pop.popup").fadeOut('normal', function () {
			$(this).find("#myContent").html("");
		});
		return false;
	});

});
