+
\ No newline at end of file
diff --git a/resources/library/interactivities/spl-text.wgt/locales/fr/index.html b/resources/library/interactivities/spl-text.wgt/locales/fr/index.html
new file mode 100644
index 00000000..8c2ccdb6
--- /dev/null
+++ b/resources/library/interactivities/spl-text.wgt/locales/fr/index.html
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+ Template
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/resources/library/interactivities/spl-text.wgt/locales/fr/scripts/wcontainer.js b/resources/library/interactivities/spl-text.wgt/locales/fr/scripts/wcontainer.js
new file mode 100644
index 00000000..46ac92a9
--- /dev/null
+++ b/resources/library/interactivities/spl-text.wgt/locales/fr/scripts/wcontainer.js
@@ -0,0 +1,259 @@
+var sankoreLang = {
+ view: "D'affichage",
+ edit: "Modifier",
+ example: "bonjour, ceci est la première phrase. salut, c'est la deuxième phrase. bonjour à nouveau, c'est la troisième phrase. bonjour, c'est la quatrième phrase. salut, désolé, je suis en retard, je suis la cinquième phrase."
+};
+
+// if use the "view/edit" button or rely on the api instead
+var isSankore = false;
+// whether to do window.resize or not (window = widget area)
+var isBrowser = ( typeof( widget ) == "undefined" );
+
+function wcontainer( containerID )
+{
+ // some protecred variables
+ var thisInstance = this;
+ this.editMode = false;
+ var data = {}; // see setData and getData
+
+ // widget size parameters
+ this.minHeight = 100;
+ this.minWidth = 400;
+
+ // set to 0 for no max width restriction
+ this.maxWidth = 0;
+
+ // links to the elements of the widget
+ this.elements = {};
+
+ /*
+ ============
+ create
+ ============
+ - creates html base, inits this.elements, assings events
+ */
+ this.create = function( containerID )
+ {
+ var html =
+ '
+
+
+
\ No newline at end of file
diff --git a/resources/library/interactivities/spl-text.wgt/locales/ru/scripts/wcontainer.js b/resources/library/interactivities/spl-text.wgt/locales/ru/scripts/wcontainer.js
new file mode 100644
index 00000000..2694b4f1
--- /dev/null
+++ b/resources/library/interactivities/spl-text.wgt/locales/ru/scripts/wcontainer.js
@@ -0,0 +1,259 @@
+var sankoreLang = {
+ view: "Показать",
+ edit: "Изменить",
+ example: "привет, это первое предложение. а это второе предложение. и снова привет, это третье предложение. добрый день, это четвертое предложение. привет, извини, но я последнее предложение."
+};
+
+// if use the "view/edit" button or rely on the api instead
+var isSankore = false;
+// whether to do window.resize or not (window = widget area)
+var isBrowser = ( typeof( widget ) == "undefined" );
+
+function wcontainer( containerID )
+{
+ // some protecred variables
+ var thisInstance = this;
+ this.editMode = false;
+ var data = {}; // see setData and getData
+
+ // widget size parameters
+ this.minHeight = 100;
+ this.minWidth = 400;
+
+ // set to 0 for no max width restriction
+ this.maxWidth = 0;
+
+ // links to the elements of the widget
+ this.elements = {};
+
+ /*
+ ============
+ create
+ ============
+ - creates html base, inits this.elements, assings events
+ */
+ this.create = function( containerID )
+ {
+ var html =
+ '
' +
+ '
' +
+ '' +
+ '
' +
+ '
' +
+ '' +
+ '
' +
+ '
' +
+ '
' +
+ '
' +
+ '
' +
+ '
' +
+ '
' +
+ '
';
+
+ var container = $( containerID );
+
+ container.append( html );
+ this.elements.edit = container.find( ".editmode" );
+ this.elements.view = container.find( ".viewmode" );
+ this.elements.container = container;
+ this.elements.subcontainer = container.find( "#mp_content" );
+ this.elements.containerView = this.elements.subcontainer.find( ".viewmode" );
+ this.elements.containerEdit = this.elements.subcontainer.find( ".editmode" );
+
+ container.find( ".viewmode button" ).click( function(){
+ thisInstance.modeEdit();
+ } );
+
+ container.find( ".editmode button" ).click( function(){
+ thisInstance.modeView();
+ } );
+ };
+
+
+ /*
+ ===============
+ setViewContent
+ ===============
+ - assigns custom html to the viewmode container
+ */
+ this.setViewContent = function( html )
+ {
+ this.elements.container.find( "#mp_content .viewmode" ).html( html );
+ };
+
+ /*
+ ===============
+ setEditContent
+ ===============
+ - assigns custom html to the editmode container
+ */
+ this.setEditContent = function( html )
+ {
+ this.elements.container.find( "#mp_content .editmode" ).html( html );
+ };
+
+
+
+ /*
+ =========================
+ modeEdit and modeView
+ =========================
+ - switch the widget betweed modes
+ * for customization extend onEditMode and onViewMode
+ */
+ this.modeEdit = function()
+ {
+ this.onEditMode();
+ this.editMode = true;
+ this.elements.edit.removeClass( "hide" );
+ this.elements.view.addClass( "hide" );
+
+ this.adjustSize();
+ };
+ this.modeView = function()
+ {
+ this.onViewMode();
+ this.editMode = false;
+ this.elements.edit.addClass( "hide" );
+ this.elements.view.removeClass( "hide" );
+
+ this.adjustSize();
+ };
+
+
+
+ /*
+ ================
+ adjustSize
+ ================
+ - changes the widget size (window and container)
+ */
+ this.adjustSize = function( width, height )
+ {
+ // retrieve the arguments
+ if( arguments.length < 2 )
+ {
+ var s = ( this.editMode )? this.editSize() : this.viewSize();
+ var width = s.w;
+ var height = s.h;
+ }
+
+ // check for validity
+ if( width + height == 0 )
+ return;
+
+ // add view/edit bar height
+ if( !isSankore ){
+ height += $( this.elements.container ).find( "#mp_setup" ).outerHeight();
+ }
+
+ // apply min and max restrictions
+ width = Math.max( this.minWidth, width );
+ height = Math.max( this.minHeight, height );
+ if( this.maxWidth ){
+ width = Math.min( width, this.maxWidth );
+ }
+
+ // if viewed as a widget, resize the window
+ if( !isBrowser )
+ {
+ var dw = this.getData( "dw" );
+ var dh = this.getData( "dh" );
+
+ if( width == 0 ){
+ width = widget.width;
+ }
+ if( height == 0 ){
+ height = widget.height;
+ }
+ window.resizeTo( width + dw, height + dh );
+ }
+
+ // resize the container
+ var params = {};
+ if( width != 0 ){
+ params.width = width;
+ }
+ if( height != 0 ){
+ params.height = height;
+ }
+
+ this.elements.container.animate( params );
+
+ };
+
+ /*
+ ======================
+ setData and getData
+ ======================
+ - store some data inside
+ */
+ this.setData = function( name, value ){
+ data[name] = value;
+ };
+ this.getData = function( name ){
+ if( typeof( data[name] ) == "undefined" ){
+ return null;
+ } else return data[name];
+ };
+
+
+ // redefinable methods
+
+ /*
+ ==========================
+ onEditMode and onViewMode
+ ==========================
+ - these are called when the mode is being changed
+ */
+ this.onEditMode = function(){
+ //
+ };
+ this.onViewMode = function(){
+ //
+ };
+
+ /*
+ ======================
+ viewSize and editSize
+ ======================
+ - calculate container size for the adjustSize method
+ * they are likely to be redefined for each particular widget
+ */
+ this.viewSize = function(){
+ return {
+ w: this.elements.containerView.outerWidth(),
+ h: this.elements.containerView.outerHeight()
+ };
+ };
+ this.editSize = function(){
+ return {
+ w: this.elements.containerEdit.outerWidth(),
+ h: this.elements.containerEdit.outerHeight()
+ };
+ };
+
+ /*
+ =====================
+ checkAnswer
+ =====================
+ - check if the exercise in the view mode was done right
+ * redefine it for each particular widget
+ */
+ this.checkAnswer = function()
+ {
+ //
+ };
+
+
+ // constructor end
+
+ // if the constructor was called with a parameter,
+ // call create() automatically
+ if( arguments.length > 0 ){
+ this.create( containerID );
+ }
+ this.setData( "dw", this.elements.container.outerWidth( true ) - this.elements.container.width() );
+ this.setData( "dh", this.elements.container.outerHeight( true ) - this.elements.container.height() );
+ window.winstance = thisInstance;
+}
diff --git a/resources/library/interactivities/spl-text.wgt/scripts/app2.js b/resources/library/interactivities/spl-text.wgt/scripts/app2.js
index d357e7bc..e6c8eea4 100644
--- a/resources/library/interactivities/spl-text.wgt/scripts/app2.js
+++ b/resources/library/interactivities/spl-text.wgt/scripts/app2.js
@@ -27,9 +27,9 @@ $(document).ready(function()
var sentences = "";
if(window.sankore)
- sentences = (sankore.preference("ordSplText", ""))?sankore.preference("ordSplText", ""):"hello, this is the first sentence. hi, this is the second sentence. hello again, this is the third sentence. good morning, this is the fifth sentence. hi, sorry, i\'m late, i\'m the fourth sentence.";
+ sentences = (sankore.preference("ordSplText", ""))?sankore.preference("ordSplText", ""):sankoreLang.example;
else
- sentences = "hello, this is the first sentence. hi, this is the second sentence. hello again, this is the third sentence. good morning, this is the fifth sentence. hi, sorry, i\'m late, i\'m the fourth sentence.";
+ sentences = sankoreLang.example;
w.maxWidth = 600;
@@ -180,5 +180,14 @@ $(document).ready(function()
sankore.setPreference("ordSplText", w.getData( "text" ));
}
});
+
+ if (window.widget) {
+ window.widget.onleave = function(){
+ if(w.editMode)
+ sankore.setPreference("ordSplText", w.elements.container.find( "textarea" ).val());
+ else
+ sankore.setPreference("ordSplText", w.getData( "text" ));
+ }
+ }
});
\ No newline at end of file
diff --git a/resources/library/interactivities/spl-text.wgt/scripts/jquery-1.6.2.min.js b/resources/library/interactivities/spl-text.wgt/scripts/jquery-1.6.2.min.js
new file mode 100644
index 00000000..48590ecb
--- /dev/null
+++ b/resources/library/interactivities/spl-text.wgt/scripts/jquery-1.6.2.min.js
@@ -0,0 +1,18 @@
+/*!
+ * jQuery JavaScript Library v1.6.2
+ * http://jquery.com/
+ *
+ * Copyright 2011, John Resig
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ * Copyright 2011, The Dojo Foundation
+ * Released under the MIT, BSD, and GPL Licenses.
+ *
+ * Date: Thu Jun 30 14:16:56 2011 -0400
+ */
+(function(a,b){function cv(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cs(a){if(!cg[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ch||(ch=c.createElement("iframe"),ch.frameBorder=ch.width=ch.height=0),b.appendChild(ch);if(!ci||!ch.createElement)ci=(ch.contentWindow||ch.contentDocument).document,ci.write((c.compatMode==="CSS1Compat"?"":"")+""),ci.close();d=ci.createElement(a),ci.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ch)}cg[a]=e}return cg[a]}function cr(a,b){var c={};f.each(cm.concat.apply([],cm.slice(0,b)),function(){c[this]=a});return c}function cq(){cn=b}function cp(){setTimeout(cq,0);return cn=f.now()}function cf(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ce(){try{return new a.XMLHttpRequest}catch(b){}}function b$(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g0){c!=="border"&&f.each(e,function(){c||(d-=parseFloat(f.css(a,"padding"+this))||0),c==="margin"?d+=parseFloat(f.css(a,c+this))||0:d-=parseFloat(f.css(a,"border"+this+"Width"))||0});return d+"px"}d=bx(a,b,b);if(d<0||d==null)d=a.style[b]||0;d=parseFloat(d)||0,c&&f.each(e,function(){d+=parseFloat(f.css(a,"padding"+this))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+this+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+this))||0)});return d+"px"}function bm(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(be,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bl(a){f.nodeName(a,"input")?bk(a):"getElementsByTagName"in a&&f.grep(a.getElementsByTagName("input"),bk)}function bk(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bj(a){return"getElementsByTagName"in a?a.getElementsByTagName("*"):"querySelectorAll"in a?a.querySelectorAll("*"):[]}function bi(a,b){var c;if(b.nodeType===1){b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}}function bh(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c=f.expando,d=f.data(a),e=f.data(b,d);if(d=d[c]){var g=d.events;e=e[c]=f.extend({},d);if(g){delete e.handle,e.events={};for(var h in g)for(var i=0,j=g[h].length;i=0===c})}function V(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function N(a,b){return(a&&a!=="*"?a+".":"")+b.replace(z,"`").replace(A,"&")}function M(a){var b,c,d,e,g,h,i,j,k,l,m,n,o,p=[],q=[],r=f._data(this,"events");if(!(a.liveFired===this||!r||!r.live||a.target.disabled||a.button&&a.type==="click")){a.namespace&&(n=new RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")),a.liveFired=this;var s=r.live.slice(0);for(i=0;ic)break;a.currentTarget=e.elem,a.data=e.handleObj.data,a.handleObj=e.handleObj,o=e.handleObj.origHandler.apply(e.elem,arguments);if(o===!1||a.isPropagationStopped()){c=e.level,o===!1&&(b=!1);if(a.isImmediatePropagationStopped())break}}return b}}function K(a,c,d){var e=f.extend({},d[0]);e.type=a,e.originalEvent={},e.liveFired=b,f.event.handle.call(c,e),e.isDefaultPrevented()&&d[0].preventDefault()}function E(){return!0}function D(){return!1}function m(a,c,d){var e=c+"defer",g=c+"queue",h=c+"mark",i=f.data(a,e,b,!0);i&&(d==="queue"||!f.data(a,g,b,!0))&&(d==="mark"||!f.data(a,h,b,!0))&&setTimeout(function(){!f.data(a,g,b,!0)&&!f.data(a,h,b,!0)&&(f.removeData(a,e,!0),i.resolve())},0)}function l(a){for(var b in a)if(b!=="toJSON")return!1;return!0}function k(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(j,"$1-$2").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNaN(d)?i.test(d)?f.parseJSON(d):d:parseFloat(d)}catch(g){}f.data(a,c,d)}else d=b}return d}var c=a.document,d=a.navigator,e=a.location,f=function(){function J(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(J,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/\d/,n=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,o=/^[\],:{}\s]*$/,p=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,q=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,r=/(?:^|:|,)(?:\s*\[)+/g,s=/(webkit)[ \/]([\w.]+)/,t=/(opera)(?:.*version)?[ \/]([\w.]+)/,u=/(msie) ([\w.]+)/,v=/(mozilla)(?:.*? rv:([\w.]+))?/,w=/-([a-z])/ig,x=function(a,b){return b.toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=n.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.6.2",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.done(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;A.resolveWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!A){A=e._Deferred();if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNaN:function(a){return a==null||!m.test(a)||isNaN(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1;var c;for(c in a);return c===b||D.call(a,c)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw a},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(o.test(b.replace(p,"@").replace(q,"]").replace(r,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(b,c,d){a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b)),d=c.documentElement,(!d||!d.nodeName||d.nodeName==="parsererror")&&e.error("Invalid XML: "+b);return c},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i1?h.call(arguments,0):c,--e||g.resolveWith(g,h.call(b,0))}}var b=arguments,c=0,d=b.length,e=d,g=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred();if(d>1){for(;c
a",d=a.getElementsByTagName("*"),e=a.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=a.getElementsByTagName("input")[0],k={leadingWhitespace:a.firstChild.nodeType===3,tbody:!a.getElementsByTagName("tbody").length,htmlSerialize:!!a.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55$/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:a.className!=="t",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,k.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,k.optDisabled=!h.disabled;try{delete a.test}catch(v){k.deleteExpando=!1}!a.addEventListener&&a.attachEvent&&a.fireEvent&&(a.attachEvent("onclick",function(){k.noCloneEvent=!1}),a.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),k.radioValue=i.value==="t",i.setAttribute("checked","checked"),a.appendChild(i),l=c.createDocumentFragment(),l.appendChild(a.firstChild),k.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,a.innerHTML="",a.style.width=a.style.paddingLeft="1px",m=c.getElementsByTagName("body")[0],o=c.createElement(m?"div":"body"),p={visibility:"hidden",width:0,height:0,border:0,margin:0},m&&f.extend(p,{position:"absolute",left:-1e3,top:-1e3});for(t in p)o.style[t]=p[t];o.appendChild(a),n=m||b,n.insertBefore(o,n.firstChild),k.appendChecked=i.checked,k.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,k.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="",k.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="