$(function() {
  $.nyroModalSettings({
    processHandler: function(settings) {
      var from = settings.from;
      if (from && from.href && from.href.indexOf('http://www.youtube.com/watch?v=') == 0) {
        $.nyroModalSettings({
          type: 'swf',
          height: 355,
          width: 425,
          url: from.href.replace(new RegExp("watch\\?v=", "i"), 'v/')
        });
      }
    }
  });
});


$(document).ready(function(){
	$('#utube a').each(function(index) {
    	url = this.href;
    	url = $.jYoutube(url,'small');
    	this.innerHTML = '<img src="'+url+'" />';});});

