.pp_pic_holder'); var pp_top_pos = parseInt(pp_pic_holder.css('top'), 10); var new_pp_top_pos; if(pp_top_pos > h_plus/2){ new_pp_top_pos = pp_top_pos - h_plus/2; } else{ new_pp_top_pos = 0; } pp_pic_holder.animate({top: new_pp_top_pos}, 200); pp_content.animate({height: '+=' + h_plus}, 200); } $(window).trigger('scroll.prettyphoto_gm'); } }); }; $('#mosaic_ID63').gmediaMosaic(settings); }); " />