function modalMov(path, title, desc, id, w, h) { window.location.hash = '#video_' + id; var $modal = $('') .append('
'+title+'
') .append('
') .append('
'+desc+'
') .appendTo('body'); $modal.css({ width:$modal.width()+'px', height:$modal.height()+'px' }); $.nyroModalManual({ url: '#modal_mov', width:w, height:h, minWidth:w, minHeight:h, beforeHideContent:function(a,b,c){ $('#nyroModalContent').fadeOut('normal',function(){ c(); $modal.remove(); }); } }); } function videoAutoModal() { var filter=/video_([a-f0-9]{32})/i var a = filter.exec(window.location.hash); if(a != null) { $('#video_'+a[1]).trigger('click'); } } $(document).ready(function(){ videoAutoModal(); });