$(document).ready(function() {
//centro las imagenes horizontalmente
if(! $.browser.msie){
$('div.view-id-Fotos div.pics div.imgGalRota img').each(function(){
$(this).css('margin-left', (750-$(this).attr('width'))/2 );
$(this).css('margin-top', (500-$(this).attr('height'))/2 );
})
}
/*javascript para la grilla de la portada*/
var timer;
//centro las imagenes verticalmente
$('img.imagecache-fotos_portada').load(function(){
$(this).css('margin-top', (147-$(this).attr('height'))/2 );
})
$('img.imagecache-fotos_portada').each(function(){
$(this).css('margin-top', (147-$(this).attr('height'))/2 );
})
//cuando ingresa el mouse en la muestra si no es ie agrando la imagen
$("div.contenedor-muestra").bind('mouseenter', function() {
//si es internet explorer no hago nada
if($.browser.msie){
return false;
}
divChico=$(this).attr('id');
timer=setTimeout("mostrarFotoGrande('"+divChico+"')",400);
})
//si salgo del div paro el timer
$("div.contenedor-muestra").bind('mouseleave', function() {
clearInterval(timer);
})
//si salgo de la muestra grande paro el timer y la oculto
$("div.contenedor-muestra2").bind('mouseleave', function() {
clearInterval(timer);
$(this).fadeOut(300);
return false;
})
/*modifico el formulario de busqueda*/
/*
$("div.views-exposed-widget").incrustar({
izquierda: 10,
arriba : 2,
efecto : 'desvanecer',
velocidad : 'fast'
});
*/
//$("#edit-field-fotografos-muestra-nid").combobox()
//$("#edit-title").inputLabel();
// $("#edit-field-fotografos-muestra-nid").inputLabel(false,{color:"#CCC"});
// $("#edit-date-filter-value-datepicker-popup-0").inputLabel(false,{color:"#CCC"});
/*scripts de fotograma 2009*/
$("span.texoVerMas").hide();
$('Ver más ').insertAfter('.texoVerMas');
$('Ocultar ').insertAfter('.texoVerMas');
$("a.ocultar").hide();
$("a.verMas").click(function(){
$(this).parents("p").children("a.verMas").hide(0);
$(this).parents("p").children("span.texoVerMas").show();
$(this).parents("p").children("a.ocultar").fadeIn(0);
});
$("a.ocultar").click(function(){
$(this).parents("p").children("span.texoVerMas").hide(0);
$(this).parents("p").children("a.ocultar").hide(0);
$(this).parents("p").children("a.verMas").fadeIn(0);
});
//$("div.paginado_exposiciones .pager-previous > *").text('< Anterior');
//$("div.paginado_exposiciones .pager-next > *").text('Siguiente >');
//alert('va');
//GEvent.addListener(marker, "click", function() {
// marker.openInfoWindowHtml('juan pablo cassinelli');
//});
//seteo los campos del formulario de contacto
/*if(DatosUser){
$("#edit-submitted-nombre").val(DatosUser['name']);
$("#edit-submitted-mail").val(DatosUser['mail']);
}*/
$("#edit-title").change(function(){
$("#edit-field-ubicacion-0-name").val($(this).val());
})
$("#edit-field-direccion-0-value").change(function(){
$("#edit-field-ubicacion-0-street").val($(this).val());
})
$("#edit-field-departamento-value").change(function(){
$("#edit-field-ubicacion-0-city").val($(this).val());
})
});
function getTextoMarcaMapa(){
var texto= $("div.node-type-lugares div.field-field-direccion div.field-item").attr('innerHTML');
texto=texto +'
'+$("div.node-type-lugares div.field-field-telefonos").attr('innerHTML');
return texto;
}
/*function que muestra el div con la foto grande, si no esta creado crea el div*/
function mostrarFotoGrande(divChico){
//divChico=$(this).attr('id');
divGrande='#'+divChico+'-2';
if($(divGrande).html()==''){
//copio los objetos del div chico al div grande, cambiando la foto chica por la grande
$('#'+divChico + ' div.contenedor-muestra1 div.views-field-field-foto-fid-1').clone().appendTo(divGrande);
$('#'+divChico + ' div.contenedor-muestra1 div.views-field-field-fotografos-muestra-nid').clone().appendTo(divGrande);
$('#'+divChico + ' div.contenedor-muestra1 div.views-field-field-lugar-nid').clone().appendTo(divGrande);
$('#'+divChico + ' div.contenedor-muestra1 div.views-field-field-fecha-value').clone().appendTo(divGrande);
//html='