$(document).ready(function() {
   $("#mainNavigation li").hover(function () {
	   $(this).find("div").show();
	   $(this).addClass("active");
   },
   function () {
	   $(this).find("div").hide();
	   $(this).removeClass("active");
   });



   $(".campaign").dialog({
		bgiframe: true,
		autoOpen: false,
		width: "auto",
		height:"auto",
		modal: true,
		resizable:false,
		overlay: {
			backgroundColor: '#000',
			opacity: 0.7
		}
	});
   
   $(".detailAmpliado").dialog({
		bgiframe: true,
		autoOpen: false,
		width: "auto",
		height:"auto",
		modal: true,
		resizable:false,
		overlay: {
			backgroundColor: '#000',
			opacity: 0.7
		}
	});

   $("#politics").dialog({
		bgiframe: true,
		autoOpen: false,
		width: "auto",
		height:"auto",
		modal: true,
		resizable:false,
		overlay: {
			backgroundColor: '#000',
			opacity: 0.7
		}
	});

	$('.comunicationItem').click(function() {
		$('#camp' + $(this).attr("id")).dialog('open');
	});
	
	$('.detalleAmpliar').click(function() {
		$('#z' + $(this).attr("id")).dialog('open');
		
		return false;
	});
	
	$('.productosPreImgBusqAvan').hover(function() {
		$(this).parent().find(".productosOverlay").show();
		return false;
	},function() {
		$(this).parent().find(".productosOverlay").hide();
		return false;
	}
	);
	
});