function FluidForms(){}
FluidForms.prototype.load = function(){
	
	var basePath = "http://static.fluidforms.eu:8080/apps/js/widget-loader/",
	
		target = "#design-widgit",
		cssURL = "http://s.fluidforms.eu:8080/apps/js/widget-loader/css/widget-loader-2-07.min.css",
		requiredJQueryVersion = "1.2.6";
	
	this.params = {
		type:"java",
		productID: 35,
		width:560, 
		height:560, 
		
		lang:"en"
	}

	javascript:(function(e,a,g,h,f,c,b,d){if(!(f=e.jQuery)||g>f.fn.jquery||h(f)){c=a.createElement("script");c.type="text/javascript";c.src="http://ajax.googleapis.com/ajax/libs/jquery/"+g+"/jquery.min.js";c.onload=c.onreadystatechange=function(){if(!b&&(!(d=this.readyState)||d=="loaded"||d=="complete")){h((f=e.jQuery).noConflict(1),b=1);f(c).remove()}};a.documentElement.childNodes[0].appendChild(c)}})(window,document,requiredJQueryVersion,function($,L){
		fluidforms.$ = $;
		$(document.createElement('link') ).attr({ href: cssURL, media: 'screen', type: 'text/css', rel: 'stylesheet' }).appendTo('head'); 
		$(document).ready(function(){
			if(!fluidforms.params.lang){
				fluidforms.params.lang = $("html").attr("lang");
			}
			
				// put an extend in here
				var widgetParams = {
					
					"id":"applet",
					"width":560,
					"height":560,
					"mayscript":true,
					"scriptable":true,
					"image":"http://static.fluidforms.eu/apps/js/widget-loader/js/java/loading.gif",
					"code":"moebius",
					"codebase":"http://static.fluidforms.eu/apps/java/moebius/applet_v10/",
					"lang":fluidforms.params.lang
				}
				
				var userParams = {archive:"moebius.jar, core.jar, FluidFormsLibs.jar, json.jar, P5Thinlet.jar, javascript.jar"},
				widgetParams = $.extend(widgetParams, userParams||{});
				
				
	
			

			widgetParams.name = "MoebiusRing";
			widgetParams.lang = fluidforms.params.lang;

			fluidforms.params.widgetParams = widgetParams;
			fluidforms.params.widget = "http://static.fluidforms.eu/apps/java/moebius/applet_v10/moebius";
			
			
			$.getScriptCached("http://static.fluidforms.eu:8080/apps/js/widget-loader/js/jquery.widget-loader-2-30.min.js", function(){
					fluidforms.params = $.extend(fluidforms.params, typeof(fluidformsParams)!=="undefined"?fluidformsParams:{});
					fluidforms.params.widgetParams = $.extend(fluidforms.params.widgetParams, window.widgetParams||{});
					$(target).loadFluidFormsWidget(fluidforms.params);
				});
		});
	});
}
var fluidforms = new FluidForms();
fluidforms.load();

// overrides getScript so that we can cache the script that it is loading
$.getScriptCached = function(url, callback){ $.ajax({ type: "GET", url: url, success: callback, dataType: "script", cache: true }); }; 