/* Plugin: nyjvideo - Navayan jQuery Autoplay Embedded Video Author: Amol Nirmala Waman URL: http://blog.navayan.com Copyright: (C) Author. Copyright details must be intact with this plugin. USAGE: $.nyjvideo('.selector_name', {'event': 'click', 'width': 250, 'height': 200}); */ (function($){$.nyjvideo=function(selector,settings){var config={width:480,height:280,event:"click"};if(settings){$.extend(config,settings)}var obj=$(selector);obj.each(function(){var image=$(".vidimg",obj);var video=$(".videoplayer",obj);var evnt=config.event;var agent=navigator.userAgent.toLowerCase();video.hide();var video_src=$("embed",obj).attr("src");image.bind(evnt,function(){image.hide();video.show();$("embed",obj).remove();$("object",obj).remove();var new_obj='';"";video.append(new_obj)})});return this}})(jQuery);