$(function(){
	$("div.container_podcast a.dialog").click(function()
	{
		$('#externel_dialog').html('');
		$('#externel_dialog').append('<iframe id="externel_dialog_iframe" src="'+this.href+'"></iframe>');
		$('#externel_dialog').dialog('destroy');
		$('#externel_dialog').dialog({
		autoOpen: true,
		width: 980,
		height:600,
		modal:true,
		buttons: {},
		position:'top',
		title:$(this).attr('title')});
			
		return false;
		
	});
	
	$("div.container_podcast a.itunes").click(function()
	{		
		document.location.href = this.href.replace("http://","itpc://");
			
		return false;
		
	});
	
	$("div.container_podcast a.external").click(function()
	{		
		window.open(this.href);
			
		return false;
		
	});
	
	//empty search fields on focus
	$("form#cse-search-box input").bind('focus', function(){if($(this).getValue() == i18n_public['recherche_podcast']) $(this).attr("value","")});
});