(function($){$.fn.jdivxSettings=function(attributes){var embeded=$("#"+this.attr("id")+"_jdivx_embed");var divxobject=this.children("object");var defaults={width:embeded.attr("width"),height:embeded.attr("height"),src:embeded.attr("src"),previewImage:embeded.attr("previewImage"),autoPlay:embeded.attr("autoplay"),loop:embeded.attr("loop"),allowContextMenu:embeded.attr("allowContextMenu"),disableDimmer:embeded.attr("disabledimmer"),bufferingMode:embeded.attr("bufferingMode"),minVersion:embeded.attr("minVersion"),pluginspage:embeded.attr("pluginspage"),custommode:embeded.attr("custommode")};var attributes=$.extend(defaults,attributes);divxobject.attr({width:attributes.width,height:attributes.height});embeded.attr({width:attributes.width,height:attributes.height});delete attributes.width;delete attributes.height;var paramName="";for(i in attributes){divxobject.children("param[name="+i+"]").val(attributes[i]);embeded.attr(i,attributes[i])};var reload=this.html();this.html("");this.html(reload)};$.fn.jdivx=function(attributes){var defaults={width:480,height:270,src:"empty",previewImage:"empty",autoPlay:"false",loop:"false",allowContextMenu:"true",disableDimmer:"false",bufferingMode:"default",minVersion:"1.4.0",pluginspage:"http://go.divx.com/plugin/download/",custommode:"none"};var attributes=$.extend(defaults,attributes);var params='<object id="'+this.attr("id")+'_jdivx" class="jdivx" width="'+attributes.width+'" height="'+attributes.height+'" codebase="http://go.divx.com/plugin/DivXBrowserPlugin.cab" classid="clsid:67DABFBF-D0AB-41fa-9C46-CC0F21721616">\n';var embedparams='<embed  id="'+this.attr("id")+'_jdivx_embed" width="'+attributes.width+'" height="'+attributes.height+'" \n pluginspage="http://go.divx.com/plugin/download/ \n"';delete attributes.width;delete attributes.height;for(i in attributes){params+='<param  value="'+attributes[i]+'" name="'+i+'"/>\n';embedparams+=i+'="'+attributes[i]+'" '};embedparams+=' type="video/divx" />\n';params+=embedparams;params+="</object>\n";this.html(params)}})(jQuery);
