function popup(element, v){
  if (v=='hide'){
    $(element).fadeOut("slow");
    $("#backgroundPopup").fadeOut("slow");
  }else{
	var windowWidth = $(window).width();
	var windowHeight = $(window).height();
	var popupHeight = $(element).height();
	var popupWidth = $(element).width();
	//centering
	$(element).css({
		"top": windowHeight/2-popupHeight/2,
		"left": windowWidth/2-popupWidth/2
	});
	//only need force for IE6
	$("#backgroundPopup").css({
		"height": windowHeight,
		"opacity": "0.7",
		"position": "fixed",
		"top": "0",
		"left": "0",
		"width": "100%",
		"z-index": "999"
	});
    $(element).fadeIn("slow");
	$("#backgroundPopup").fadeIn("slow");
  };  
  $("#backgroundPopup").click(function() {
    $(element).fadeOut("slow");
	$(this).fadeOut("slow");
  });
}

$(document).ready(function() {
$(".flickr_badge_image a").removeAttr("href");
$("#twitter_update_list a").attr('target', '_blank');
$(".recipes .entry a").attr('target', '_blank');

 });
