$(document).ready(function(){
	$('.actionDrop').click(function() {
		var puce = $(this).children('.puce').first().text();
		
		if(puce=="+") {
			$(this).children('.puce').first().text("-");
		} else {
			$(this).children('.puce').first().text("+");
		}
		
		$(this).next('.dropDownText').slideToggle(400);
	});
	
	flowplayer("a.player", "/swf/player/flowplayer-3.2.7.swf",{ 
		clip:  {
			autoPlay: false, 
			autoBuffering: false,
			scaling: 'orig'
		}
	});
	
	$('[id^=vid-]').dialog({
		autoOpen: false,
		modal: true,
		closeText: "Fermer",
		resizable: false,
		width: 340
	});
	
	$('[id^=linkvid-]').click(function() {
		var vidIndex = this.id.substr(this.id.indexOf("-")+1);
		$('#vid-'+vidIndex).dialog('open');
	});
	
	$(".immoDataBlock > div:not(#relatedVideos) > p.actionDrop:nth-child(1)").click();
});
