overlay_me 0.12.0 → 0.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG.md +7 -2
- data/Gemfile.lock +1 -1
- data/README.md +14 -9
- data/Rakefile +1 -0
- data/javascripts/addons/layout_resizer.js.coffee +7 -7
- data/javascripts/basics.js.coffee +19 -10
- data/javascripts/draggable.js.coffee +16 -20
- data/javascripts/init.js.coffee +8 -2
- data/javascripts/lib/backbone.js +13 -13
- data/javascripts/lib/jquery.js +802 -802
- data/javascripts/menu.js.coffee +34 -25
- data/javascripts/menu_item.js.coffee +4 -4
- data/javascripts/mixins/hideable.js.coffee +13 -0
- data/javascripts/mixins/storable.js.coffee +17 -0
- data/javascripts/overlay_me.js.coffee +4 -0
- data/javascripts/overlays.js.coffee +5 -5
- data/javascripts/overlays/content_div_mngmt.js.coffee +33 -37
- data/javascripts/overlays/draggable_image.js.coffee +15 -12
- data/javascripts/overlays/dynamic_images_mngmt.js.coffee +2 -2
- data/javascripts/overlays/image.js.coffee +31 -36
- data/javascripts/overlays/images_container.js.coffee +22 -0
- data/javascripts/overlays/images_mngt_div.js.coffee +15 -52
- data/lib/overlay_me/version.rb +1 -1
- data/overlay_me.css +86 -59
- data/overlay_me.gemspec +1 -1
- data/overlay_me.js +1134 -1052
- data/stylesheets/overlay_me.css.scss +44 -21
- data/vendor/assets/javascripts/overlay_me/addons/layout_resizer.js +11 -11
- data/vendor/assets/javascripts/overlay_me/overlay_me.min.js +326 -319
- metadata +7 -6
- data/addons/layout_resizer.js +0 -51
@@ -1,20 +1,21 @@
|
|
1
1
|
@import "compass/css3";
|
2
2
|
|
3
|
-
$menu_width:
|
3
|
+
$menu_width: 200px;
|
4
4
|
$border: 1px solid rgba(white, 0.2);
|
5
5
|
|
6
6
|
button {
|
7
|
-
font-size:
|
8
|
-
margin: 0
|
9
|
-
padding: 0px
|
7
|
+
font-size: 9px;
|
8
|
+
margin: 0 3px;
|
9
|
+
padding: 0px 3px;
|
10
10
|
}
|
11
11
|
|
12
12
|
#overlay_me_page_container {
|
13
13
|
position: relative;
|
14
14
|
}
|
15
15
|
|
16
|
-
#
|
17
|
-
position:
|
16
|
+
#overlay_me_menu {
|
17
|
+
position: fixed;
|
18
|
+
right: 0;
|
18
19
|
z-index: 990; //to pass over Google Toolbar ;)
|
19
20
|
|
20
21
|
* {
|
@@ -27,11 +28,11 @@ button {
|
|
27
28
|
color: black;
|
28
29
|
font-size: 0.7em;
|
29
30
|
text-align: center;
|
31
|
+
@include background-image(linear-gradient(0deg, #999999, #DDD 30%,#DDD 70%,#999999 100.0%));
|
32
|
+
padding: 1px;
|
30
33
|
&:hover {
|
31
34
|
cursor: move;
|
32
35
|
}
|
33
|
-
@include background-image(linear-gradient(0deg, #999999, #DDD 30%,#DDD 70%,#999999 100.0%));
|
34
|
-
padding: 1px;
|
35
36
|
}
|
36
37
|
|
37
38
|
ul {
|
@@ -58,7 +59,7 @@ button {
|
|
58
59
|
width: 13px;
|
59
60
|
height: 9px;
|
60
61
|
border: none;
|
61
|
-
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAAJCAYAAADpeqZqAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAIlJREFUeNpivHDhQujz589TmZiYvjMQAP/+/eOQkZGZyfD//38ZIL77nzhwG4ilQJpA2BiIPxHQ8BGIDUHqYZpAOIWApiSYWmRNIDfPxaYaKD4bWR2KJiDmA+KzaHrOQMVxagJhfSD+ALXhA5TPQEgTCCcD8V+gpmRs8rg0MQI1eANpJmzyAAEGAKD/bax/HrzbAAAAAElFTkSuQmCC) no-repeat center
|
62
|
+
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAAJCAYAAADpeqZqAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAIlJREFUeNpivHDhQujz589TmZiYvjMQAP/+/eOQkZGZyfD//38ZIL77nzhwG4ilQJpA2BiIPxHQ8BGIDUHqYZpAOIWApiSYWmRNIDfPxaYaKD4bWR2KJiDmA+KzaHrOQMVxagJhfSD+ALXhA5TPQEgTCCcD8V+gpmRs8rg0MQI1eANpJmzyAAEGAKD/bax/HrzbAAAAAElFTkSuQmCC) no-repeat center 3px;
|
62
63
|
span {
|
63
64
|
display: none;
|
64
65
|
color: yellow;
|
@@ -79,7 +80,7 @@ button {
|
|
79
80
|
&.collapsed {
|
80
81
|
.item-content { display: none; }
|
81
82
|
a.collaps-button {
|
82
|
-
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAANCAYAAAB7AEQGAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAKtJREFUeNpiuHz5ctD///+lgJgBF2Z68uRJOgMDw0EgNmTAAZiA4AeQVgHiA0CchFUREpsPiOcCjZ8NZWNVBAaMjIwpQGofEOvjVAQFxkATDwJxMkgNCy7HAk3kB1KzgApf4DIJBD4CcRpQ8TZcJp2D+vQiVjcBjZ8HpBxhCtAVfQbiVKDxIMd+QtbI8u/fP04gfQ+Iw4D4LDa7WSQlJUGBdxyIn+DyAUCAAQDxsEXD9kreLQAAAABJRU5ErkJggg==) no-repeat center
|
83
|
+
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAANCAYAAAB7AEQGAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAKtJREFUeNpiuHz5ctD///+lgJgBF2Z68uRJOgMDw0EgNmTAAZiA4AeQVgHiA0CchFUREpsPiOcCjZ8NZWNVBAaMjIwpQGofEOvjVAQFxkATDwJxMkgNCy7HAk3kB1KzgApf4DIJBD4CcRpQ8TZcJp2D+vQiVjcBjZ8HpBxhCtAVfQbiVKDxIMd+QtbI8u/fP04gfQ+Iw4D4LDa7WSQlJUGBdxyIn+DyAUCAAQDxsEXD9kreLQAAAABJRU5ErkJggg==) no-repeat center top;
|
83
84
|
}
|
84
85
|
}
|
85
86
|
}
|
@@ -101,7 +102,7 @@ button {
|
|
101
102
|
|
102
103
|
|
103
104
|
label {
|
104
|
-
margin: 0
|
105
|
+
margin: 0;
|
105
106
|
font-size: 14px;
|
106
107
|
}
|
107
108
|
|
@@ -123,6 +124,7 @@ button {
|
|
123
124
|
display: block;
|
124
125
|
label {
|
125
126
|
font-size: 70%;
|
127
|
+
margin: 0 5px 0 0;
|
126
128
|
vertical-align: top;
|
127
129
|
}
|
128
130
|
input[type=range] {
|
@@ -136,6 +138,9 @@ button {
|
|
136
138
|
|
137
139
|
.controls {
|
138
140
|
padding-bottom: 5px;
|
141
|
+
label {
|
142
|
+
margin-right: 5px;
|
143
|
+
}
|
139
144
|
}
|
140
145
|
|
141
146
|
.overlay-image-block {
|
@@ -152,14 +157,15 @@ button {
|
|
152
157
|
position: absolute;
|
153
158
|
right: 0;
|
154
159
|
top: 0;
|
155
|
-
margin:
|
160
|
+
margin: 1px;
|
156
161
|
cursor: pointer;
|
157
162
|
border: 1px #AAA solid;
|
158
|
-
font-size:
|
163
|
+
font-size: 10px;
|
164
|
+
line-height: 13px;
|
159
165
|
background-color: #444;
|
160
166
|
color: white;
|
161
167
|
font-weight: bold;
|
162
|
-
padding: 0
|
168
|
+
padding: 0 3px;
|
163
169
|
}
|
164
170
|
}
|
165
171
|
|
@@ -168,7 +174,7 @@ button {
|
|
168
174
|
font-size: 75%;
|
169
175
|
}
|
170
176
|
input {
|
171
|
-
width:
|
177
|
+
width: 95px;
|
172
178
|
font-size: 10px;
|
173
179
|
}
|
174
180
|
}
|
@@ -192,13 +198,10 @@ button {
|
|
192
198
|
left: 0;
|
193
199
|
div {
|
194
200
|
position: absolute;
|
195
|
-
visibility: hidden;
|
196
201
|
&.highlight {
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
opacity: .7;
|
201
|
-
}
|
202
|
+
border: 2px solid red;
|
203
|
+
margin-top: -2px;
|
204
|
+
margin-left: -2px
|
202
205
|
}
|
203
206
|
&:hover {
|
204
207
|
cursor: move;
|
@@ -211,3 +214,23 @@ button {
|
|
211
214
|
}
|
212
215
|
}
|
213
216
|
|
217
|
+
#overlay_me_menu.collapsed {
|
218
|
+
.drag-me, .menu-item {
|
219
|
+
width: 25px;
|
220
|
+
}
|
221
|
+
.drag-me {
|
222
|
+
height: 10px;
|
223
|
+
overflow: hidden;
|
224
|
+
}
|
225
|
+
button {
|
226
|
+
height: 10px;
|
227
|
+
overflow: hidden;
|
228
|
+
}
|
229
|
+
.overlay-image-block {
|
230
|
+
height: 14px;
|
231
|
+
margin-top: 3px;
|
232
|
+
}
|
233
|
+
.overlay-image-block label, #content_div_management_block, .controls, input[type=range], #overlay_panel #contentSlider, legend, .dynamic-adds, .unicorns, button.reset, button.hide, button.del-button {
|
234
|
+
display: none;
|
235
|
+
}
|
236
|
+
}
|
@@ -2,28 +2,28 @@
|
|
2
2
|
var layout_menu, layouts;
|
3
3
|
|
4
4
|
layouts = {
|
5
|
-
smartphone_portrait:
|
6
|
-
smartphone_landscape:
|
7
|
-
tablet_port:
|
8
|
-
tablet_land:
|
5
|
+
smartphone_portrait: 320,
|
6
|
+
smartphone_landscape: 480,
|
7
|
+
tablet_port: 768,
|
8
|
+
tablet_land: 1024,
|
9
9
|
none: null
|
10
10
|
};
|
11
11
|
|
12
12
|
window.resize_page = function(width) {
|
13
13
|
if (width === null || isNaN(width)) {
|
14
|
-
$('#
|
14
|
+
$o('#overlay_me_page_container').css({
|
15
15
|
width: 'auto'
|
16
16
|
});
|
17
17
|
} else {
|
18
|
-
$('#
|
18
|
+
$o('#overlay_me_page_container').css({
|
19
19
|
width: "" + width + "px"
|
20
20
|
});
|
21
21
|
}
|
22
22
|
_.each(layouts, function(_width, name) {
|
23
23
|
if (width === _width) {
|
24
|
-
return $('body').addClass(name);
|
24
|
+
return $o('body').addClass(name);
|
25
25
|
} else {
|
26
|
-
return $('body').removeClass(name);
|
26
|
+
return $o('body').removeClass(name);
|
27
27
|
}
|
28
28
|
});
|
29
29
|
return localStorage.setItem("layout-width", width);
|
@@ -39,13 +39,13 @@
|
|
39
39
|
_.each(layouts, function(width, name) {
|
40
40
|
var button;
|
41
41
|
button = (new Backbone.View).make('button', {}, name);
|
42
|
-
$(button).addClass(name);
|
43
|
-
$(button).bind('click', function(e) {
|
42
|
+
$o(button).addClass(name);
|
43
|
+
$o(button).bind('click', function(e) {
|
44
44
|
return window.resize_page("" + width);
|
45
45
|
});
|
46
46
|
return layout_menu.append(button);
|
47
47
|
});
|
48
48
|
|
49
|
-
|
49
|
+
OverlayMe.menu.append(layout_menu.render());
|
50
50
|
|
51
51
|
}).call(this);
|
@@ -1,4 +1,4 @@
|
|
1
|
-
// OverlayMe v0.12.
|
1
|
+
// OverlayMe v0.12.1
|
2
2
|
// http://github.com/frontfoot/overlay_me
|
3
3
|
//
|
4
4
|
// Copyright (c) 2012 Joseph Boiteau, FrontFoot Media Solutions
|
@@ -11,66 +11,66 @@
|
|
11
11
|
// - html5slider - https://github.com/fryn/html5slider - Copyright (c) 2010-2011 Frank Yan
|
12
12
|
|
13
13
|
|
14
|
-
(function(window,undefined){var document=window.document,navigator=window.navigator,location=window.location;var
|
14
|
+
(function(window,undefined){var document=window.document,navigator=window.navigator,location=window.location;var OMjQuery=(function(){var OMjQuery=function(selector,context){return new OMjQuery.fn.init(selector,context,rootOMjQuery);},_OMjQuery=window.OMjQuery,_$=window.$o,rootOMjQuery,quickExpr=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,rnotwhite=/\S/,trimLeft=/^\s+/,trimRight=/\s+$/,rsingleTag=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,rvalidchars=/^[\],:{}\s]*$/,rvalidescape=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,rvalidtokens=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,rvalidbraces=/(?:^|:|,)(?:\s*\[)+/g,rwebkit=/(webkit)[ \/]([\w.]+)/,ropera=/(opera)(?:.*version)?[ \/]([\w.]+)/,rmsie=/(msie) ([\w.]+)/,rmozilla=/(mozilla)(?:.*? rv:([\w.]+))?/,rdashAlpha=/-([a-z]|[0-9])/ig,rmsPrefix=/^-ms-/,fcamelCase=function(all,letter){return(letter+"").toUpperCase();},userAgent=navigator.userAgent,browserMatch,readyList,DOMContentLoaded,toString=Object.prototype.toString,hasOwn=Object.prototype.hasOwnProperty,push=Array.prototype.push,slice=Array.prototype.slice,trim=String.prototype.trim,indexOf=Array.prototype.indexOf,class2type={};OMjQuery.fn=OMjQuery.prototype={constructor:OMjQuery,init:function(selector,context,rootOMjQuery){var match,elem,ret,doc;if(!selector){return this;}
|
15
15
|
if(selector.nodeType){this.context=this[0]=selector;this.length=1;return this;}
|
16
16
|
if(selector==="body"&&!context&&document.body){this.context=document;this[0]=document.body;this.selector=selector;this.length=1;return this;}
|
17
17
|
if(typeof selector==="string"){if(selector.charAt(0)==="<"&&selector.charAt(selector.length-1)===">"&&selector.length>=3){match=[null,selector,null];}else{match=quickExpr.exec(selector);}
|
18
|
-
if(match&&(match[1]||!context)){if(match[1]){context=context instanceof
|
19
|
-
return
|
18
|
+
if(match&&(match[1]||!context)){if(match[1]){context=context instanceof OMjQuery?context[0]:context;doc=(context?context.ownerDocument||context:document);ret=rsingleTag.exec(selector);if(ret){if(OMjQuery.isPlainObject(context)){selector=[document.createElement(ret[1])];OMjQuery.fn.attr.call(selector,context,true);}else{selector=[doc.createElement(ret[1])];}}else{ret=OMjQuery.buildFragment([match[1]],[doc]);selector=(ret.cacheable?OMjQuery.clone(ret.fragment):ret.fragment).childNodes;}
|
19
|
+
return OMjQuery.merge(this,selector);}else{elem=document.getElementById(match[2]);if(elem&&elem.parentNode){if(elem.id!==match[2]){return rootOMjQuery.find(selector);}
|
20
20
|
this.length=1;this[0]=elem;}
|
21
|
-
this.context=document;this.selector=selector;return this;}}else if(!context||context.jquery){return(context||
|
21
|
+
this.context=document;this.selector=selector;return this;}}else if(!context||context.jquery){return(context||rootOMjQuery).find(selector);}else{return this.constructor(context).find(selector);}}else if(OMjQuery.isFunction(selector)){return rootOMjQuery.ready(selector);}
|
22
22
|
if(selector.selector!==undefined){this.selector=selector.selector;this.context=selector.context;}
|
23
|
-
return
|
23
|
+
return OMjQuery.makeArray(selector,this);},selector:"",jquery:"1.7.2",length:0,size:function(){return this.length;},toArray:function(){return slice.call(this,0);},get:function(num){return num==null?this.toArray():(num<0?this[this.length+num]:this[num]);},pushStack:function(elems,name,selector){var ret=this.constructor();if(OMjQuery.isArray(elems)){push.apply(ret,elems);}else{OMjQuery.merge(ret,elems);}
|
24
24
|
ret.prevObject=this;ret.context=this.context;if(name==="find"){ret.selector=this.selector+(this.selector?" ":"")+selector;}else if(name){ret.selector=this.selector+"."+name+"("+selector+")";}
|
25
|
-
return ret;},each:function(callback,args){return
|
26
|
-
if(typeof target!=="object"&&!
|
25
|
+
return ret;},each:function(callback,args){return OMjQuery.each(this,callback,args);},ready:function(fn){OMjQuery.bindReady();readyList.add(fn);return this;},eq:function(i){i=+i;return i===-1?this.slice(i):this.slice(i,i+1);},first:function(){return this.eq(0);},last:function(){return this.eq(-1);},slice:function(){return this.pushStack(slice.apply(this,arguments),"slice",slice.call(arguments).join(","));},map:function(callback){return this.pushStack(OMjQuery.map(this,function(elem,i){return callback.call(elem,i,elem);}));},end:function(){return this.prevObject||this.constructor(null);},push:push,sort:[].sort,splice:[].splice};OMjQuery.fn.init.prototype=OMjQuery.fn;OMjQuery.extend=OMjQuery.fn.extend=function(){var options,name,src,copy,copyIsArray,clone,target=arguments[0]||{},i=1,length=arguments.length,deep=false;if(typeof target==="boolean"){deep=target;target=arguments[1]||{};i=2;}
|
26
|
+
if(typeof target!=="object"&&!OMjQuery.isFunction(target)){target={};}
|
27
27
|
if(length===i){target=this;--i;}
|
28
28
|
for(;i<length;i++){if((options=arguments[i])!=null){for(name in options){src=target[name];copy=options[name];if(target===copy){continue;}
|
29
|
-
if(deep&©&&(
|
30
|
-
target[name]=
|
31
|
-
return target;};
|
32
|
-
if(deep&&window.
|
33
|
-
return
|
34
|
-
|
35
|
-
readyList.fireWith(document,[
|
36
|
-
readyList=
|
37
|
-
if(document.addEventListener){document.addEventListener("DOMContentLoaded",DOMContentLoaded,false);window.addEventListener("load",
|
38
|
-
if(document.documentElement.doScroll&&toplevel){doScrollCheck();}}},isFunction:function(obj){return
|
29
|
+
if(deep&©&&(OMjQuery.isPlainObject(copy)||(copyIsArray=OMjQuery.isArray(copy)))){if(copyIsArray){copyIsArray=false;clone=src&&OMjQuery.isArray(src)?src:[];}else{clone=src&&OMjQuery.isPlainObject(src)?src:{};}
|
30
|
+
target[name]=OMjQuery.extend(deep,clone,copy);}else if(copy!==undefined){target[name]=copy;}}}}
|
31
|
+
return target;};OMjQuery.extend({noConflict:function(deep){if(window.$o===OMjQuery){window.$o=_$;}
|
32
|
+
if(deep&&window.OMjQuery===OMjQuery){window.OMjQuery=_OMjQuery;}
|
33
|
+
return OMjQuery;},isReady:false,readyWait:1,holdReady:function(hold){if(hold){OMjQuery.readyWait++;}else{OMjQuery.ready(true);}},ready:function(wait){if((wait===true&&!--OMjQuery.readyWait)||(wait!==true&&!OMjQuery.isReady)){if(!document.body){return setTimeout(OMjQuery.ready,1);}
|
34
|
+
OMjQuery.isReady=true;if(wait!==true&&--OMjQuery.readyWait>0){return;}
|
35
|
+
readyList.fireWith(document,[OMjQuery]);if(OMjQuery.fn.trigger){OMjQuery(document).trigger("ready").off("ready");}}},bindReady:function(){if(readyList){return;}
|
36
|
+
readyList=OMjQuery.Callbacks("once memory");if(document.readyState==="complete"){return setTimeout(OMjQuery.ready,1);}
|
37
|
+
if(document.addEventListener){document.addEventListener("DOMContentLoaded",DOMContentLoaded,false);window.addEventListener("load",OMjQuery.ready,false);}else if(document.attachEvent){document.attachEvent("onreadystatechange",DOMContentLoaded);window.attachEvent("onload",OMjQuery.ready);var toplevel=false;try{toplevel=window.frameElement==null;}catch(e){}
|
38
|
+
if(document.documentElement.doScroll&&toplevel){doScrollCheck();}}},isFunction:function(obj){return OMjQuery.type(obj)==="function";},isArray:Array.isArray||function(obj){return OMjQuery.type(obj)==="array";},isWindow:function(obj){return obj!=null&&obj==obj.window;},isNumeric:function(obj){return!isNaN(parseFloat(obj))&&isFinite(obj);},type:function(obj){return obj==null?String(obj):class2type[toString.call(obj)]||"object";},isPlainObject:function(obj){if(!obj||OMjQuery.type(obj)!=="object"||obj.nodeType||OMjQuery.isWindow(obj)){return false;}
|
39
39
|
try{if(obj.constructor&&!hasOwn.call(obj,"constructor")&&!hasOwn.call(obj.constructor.prototype,"isPrototypeOf")){return false;}}catch(e){return false;}
|
40
40
|
var key;for(key in obj){}
|
41
41
|
return key===undefined||hasOwn.call(obj,key);},isEmptyObject:function(obj){for(var name in obj){return false;}
|
42
42
|
return true;},error:function(msg){throw new Error(msg);},parseJSON:function(data){if(typeof data!=="string"||!data){return null;}
|
43
|
-
data=
|
43
|
+
data=OMjQuery.trim(data);if(window.JSON&&window.JSON.parse){return window.JSON.parse(data);}
|
44
44
|
if(rvalidchars.test(data.replace(rvalidescape,"@").replace(rvalidtokens,"]").replace(rvalidbraces,""))){return(new Function("return "+data))();}
|
45
|
-
|
45
|
+
OMjQuery.error("Invalid JSON: "+data);},parseXML:function(data){if(typeof data!=="string"||!data){return null;}
|
46
46
|
var xml,tmp;try{if(window.DOMParser){tmp=new DOMParser();xml=tmp.parseFromString(data,"text/xml");}else{xml=new ActiveXObject("Microsoft.XMLDOM");xml.async="false";xml.loadXML(data);}}catch(e){xml=undefined;}
|
47
|
-
if(!xml||!xml.documentElement||xml.getElementsByTagName("parsererror").length){
|
48
|
-
return xml;},noop:function(){},globalEval:function(data){if(data&&rnotwhite.test(data)){(window.execScript||function(data){window["eval"].call(window,data);})(data);}},camelCase:function(string){return string.replace(rmsPrefix,"ms-").replace(rdashAlpha,fcamelCase);},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toUpperCase()===name.toUpperCase();},each:function(object,callback,args){var name,i=0,length=object.length,isObj=length===undefined||
|
49
|
-
return object;},trim:trim?function(text){return text==null?"":trim.call(text);}:function(text){return text==null?"":text.toString().replace(trimLeft,"").replace(trimRight,"");},makeArray:function(array,results){var ret=results||[];if(array!=null){var type=
|
47
|
+
if(!xml||!xml.documentElement||xml.getElementsByTagName("parsererror").length){OMjQuery.error("Invalid XML: "+data);}
|
48
|
+
return xml;},noop:function(){},globalEval:function(data){if(data&&rnotwhite.test(data)){(window.execScript||function(data){window["eval"].call(window,data);})(data);}},camelCase:function(string){return string.replace(rmsPrefix,"ms-").replace(rdashAlpha,fcamelCase);},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toUpperCase()===name.toUpperCase();},each:function(object,callback,args){var name,i=0,length=object.length,isObj=length===undefined||OMjQuery.isFunction(object);if(args){if(isObj){for(name in object){if(callback.apply(object[name],args)===false){break;}}}else{for(;i<length;){if(callback.apply(object[i++],args)===false){break;}}}}else{if(isObj){for(name in object){if(callback.call(object[name],name,object[name])===false){break;}}}else{for(;i<length;){if(callback.call(object[i],i,object[i++])===false){break;}}}}
|
49
|
+
return object;},trim:trim?function(text){return text==null?"":trim.call(text);}:function(text){return text==null?"":text.toString().replace(trimLeft,"").replace(trimRight,"");},makeArray:function(array,results){var ret=results||[];if(array!=null){var type=OMjQuery.type(array);if(array.length==null||type==="string"||type==="function"||type==="regexp"||OMjQuery.isWindow(array)){push.call(ret,array);}else{OMjQuery.merge(ret,array);}}
|
50
50
|
return ret;},inArray:function(elem,array,i){var len;if(array){if(indexOf){return indexOf.call(array,elem,i);}
|
51
51
|
len=array.length;i=i?i<0?Math.max(0,len+i):i:0;for(;i<len;i++){if(i in array&&array[i]===elem){return i;}}}
|
52
52
|
return-1;},merge:function(first,second){var i=first.length,j=0;if(typeof second.length==="number"){for(var l=second.length;j<l;j++){first[i++]=second[j];}}else{while(second[j]!==undefined){first[i++]=second[j++];}}
|
53
53
|
first.length=i;return first;},grep:function(elems,callback,inv){var ret=[],retVal;inv=!!inv;for(var i=0,length=elems.length;i<length;i++){retVal=!!callback(elems[i],i);if(inv!==retVal){ret.push(elems[i]);}}
|
54
|
-
return ret;},map:function(elems,callback,arg){var value,key,ret=[],i=0,length=elems.length,isArray=elems instanceof
|
54
|
+
return ret;},map:function(elems,callback,arg){var value,key,ret=[],i=0,length=elems.length,isArray=elems instanceof OMjQuery||length!==undefined&&typeof length==="number"&&((length>0&&elems[0]&&elems[length-1])||length===0||OMjQuery.isArray(elems));if(isArray){for(;i<length;i++){value=callback(elems[i],i,arg);if(value!=null){ret[ret.length]=value;}}}else{for(key in elems){value=callback(elems[key],key,arg);if(value!=null){ret[ret.length]=value;}}}
|
55
55
|
return ret.concat.apply([],ret);},guid:1,proxy:function(fn,context){if(typeof context==="string"){var tmp=fn[context];context=fn;fn=tmp;}
|
56
|
-
if(!
|
57
|
-
var args=slice.call(arguments,2),proxy=function(){return fn.apply(context,args.concat(slice.call(arguments)));};proxy.guid=fn.guid=fn.guid||proxy.guid||
|
58
|
-
chainable=1;}else if(value!==undefined){exec=pass===undefined&&
|
56
|
+
if(!OMjQuery.isFunction(fn)){return undefined;}
|
57
|
+
var args=slice.call(arguments,2),proxy=function(){return fn.apply(context,args.concat(slice.call(arguments)));};proxy.guid=fn.guid=fn.guid||proxy.guid||OMjQuery.guid++;return proxy;},access:function(elems,fn,key,value,chainable,emptyGet,pass){var exec,bulk=key==null,i=0,length=elems.length;if(key&&typeof key==="object"){for(i in key){OMjQuery.access(elems,fn,i,key[i],1,emptyGet,value);}
|
58
|
+
chainable=1;}else if(value!==undefined){exec=pass===undefined&&OMjQuery.isFunction(value);if(bulk){if(exec){exec=fn;fn=function(elem,key,value){return exec.call(OMjQuery(elem),value);};}else{fn.call(elems,value);fn=null;}}
|
59
59
|
if(fn){for(;i<length;i++){fn(elems[i],key,exec?value.call(elems[i],i,fn(elems[i],key)):value,pass);}}
|
60
60
|
chainable=1;}
|
61
|
-
return chainable?elems:bulk?fn.call(elems):length?fn(elems[0],key):emptyGet;},now:function(){return(new Date()).getTime();},uaMatch:function(ua){ua=ua.toLowerCase();var match=rwebkit.exec(ua)||ropera.exec(ua)||rmsie.exec(ua)||ua.indexOf("compatible")<0&&rmozilla.exec(ua)||[];return{browser:match[1]||"",version:match[2]||"0"};},sub:function(){function
|
62
|
-
|
63
|
-
return
|
64
|
-
if(
|
61
|
+
return chainable?elems:bulk?fn.call(elems):length?fn(elems[0],key):emptyGet;},now:function(){return(new Date()).getTime();},uaMatch:function(ua){ua=ua.toLowerCase();var match=rwebkit.exec(ua)||ropera.exec(ua)||rmsie.exec(ua)||ua.indexOf("compatible")<0&&rmozilla.exec(ua)||[];return{browser:match[1]||"",version:match[2]||"0"};},sub:function(){function OMjQuerySub(selector,context){return new OMjQuerySub.fn.init(selector,context);}
|
62
|
+
OMjQuery.extend(true,OMjQuerySub,this);OMjQuerySub.superclass=this;OMjQuerySub.fn=OMjQuerySub.prototype=this();OMjQuerySub.fn.constructor=OMjQuerySub;OMjQuerySub.sub=this.sub;OMjQuerySub.fn.init=function init(selector,context){if(context&&context instanceof OMjQuery&&!(context instanceof OMjQuerySub)){context=OMjQuerySub(context);}
|
63
|
+
return OMjQuery.fn.init.call(this,selector,context,rootOMjQuerySub);};OMjQuerySub.fn.init.prototype=OMjQuerySub.fn;var rootOMjQuerySub=OMjQuerySub(document);return OMjQuerySub;},browser:{}});OMjQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(i,name){class2type["[object "+name+"]"]=name.toLowerCase();});browserMatch=OMjQuery.uaMatch(userAgent);if(browserMatch.browser){OMjQuery.browser[browserMatch.browser]=true;OMjQuery.browser.version=browserMatch.version;}
|
64
|
+
if(OMjQuery.browser.webkit){OMjQuery.browser.safari=true;}
|
65
65
|
if(rnotwhite.test("\xA0")){trimLeft=/^[\s\xA0]+/;trimRight=/[\s\xA0]+$/;}
|
66
|
-
|
67
|
-
function doScrollCheck(){if(
|
66
|
+
rootOMjQuery=OMjQuery(document);if(document.addEventListener){DOMContentLoaded=function(){document.removeEventListener("DOMContentLoaded",DOMContentLoaded,false);OMjQuery.ready();};}else if(document.attachEvent){DOMContentLoaded=function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",DOMContentLoaded);OMjQuery.ready();}};}
|
67
|
+
function doScrollCheck(){if(OMjQuery.isReady){return;}
|
68
68
|
try{document.documentElement.doScroll("left");}catch(e){setTimeout(doScrollCheck,1);return;}
|
69
|
-
|
70
|
-
return
|
69
|
+
OMjQuery.ready();}
|
70
|
+
return OMjQuery;})();var flagsCache={};function createFlags(flags){var object=flagsCache[flags]={},i,length;flags=flags.split(/\s+/);for(i=0,length=flags.length;i<length;i++){object[flags[i]]=true;}
|
71
71
|
return object;}
|
72
|
-
|
73
|
-
list=[],stack=[],memory,fired,firing,firingStart,firingLength,firingIndex,add=function(args){var i,length,elem,type,actual;for(i=0,length=args.length;i<length;i++){elem=args[i];type=
|
72
|
+
OMjQuery.Callbacks=function(flags){flags=flags?(flagsCache[flags]||createFlags(flags)):{};var
|
73
|
+
list=[],stack=[],memory,fired,firing,firingStart,firingLength,firingIndex,add=function(args){var i,length,elem,type,actual;for(i=0,length=args.length;i<length;i++){elem=args[i];type=OMjQuery.type(elem);if(type==="array"){add(elem);}else if(type==="function"){if(!flags.unique||!self.has(elem)){list.push(elem);}}}},fire=function(context,args){args=args||[];memory=!flags.memory||[context,args];fired=true;firing=true;firingIndex=firingStart||0;firingStart=0;firingLength=list.length;for(;list&&firingIndex<firingLength;firingIndex++){if(list[firingIndex].apply(context,args)===false&&flags.stopOnFalse){memory=true;break;}}
|
74
74
|
firing=false;if(list){if(!flags.once){if(stack&&stack.length){memory=stack.shift();self.fireWith(memory[0],memory[1]);}}else if(memory===true){self.disable();}else{list=[];}}},self={add:function(){if(list){var length=list.length;add(arguments);if(firing){firingLength=list.length;}else if(memory&&memory!==true){firingStart=length;fire(memory[0],memory[1]);}}
|
75
75
|
return this;},remove:function(){if(list){var args=arguments,argIndex=0,argLength=args.length;for(;argIndex<argLength;argIndex++){for(var i=0;i<list.length;i++){if(args[argIndex]===list[i]){if(firing){if(i<=firingLength){firingLength--;if(i<=firingIndex){firingIndex--;}}}
|
76
76
|
list.splice(i--,1);if(flags.unique){break;}}}}}
|
@@ -78,187 +78,187 @@ return this;},has:function(fn){if(list){var i=0,length=list.length;for(;i<length
|
|
78
78
|
return false;},empty:function(){list=[];return this;},disable:function(){list=stack=memory=undefined;return this;},disabled:function(){return!list;},lock:function(){stack=undefined;if(!memory||memory===true){self.disable();}
|
79
79
|
return this;},locked:function(){return!stack;},fireWith:function(context,args){if(stack){if(firing){if(!flags.once){stack.push([context,args]);}}else if(!(flags.once&&memory)){fire(context,args);}}
|
80
80
|
return this;},fire:function(){self.fireWith(this,arguments);return this;},fired:function(){return!!fired;}};return self;};var
|
81
|
-
sliceDeferred=[].slice;
|
81
|
+
sliceDeferred=[].slice;OMjQuery.extend({Deferred:function(func){var doneList=OMjQuery.Callbacks("once memory"),failList=OMjQuery.Callbacks("once memory"),progressList=OMjQuery.Callbacks("memory"),state="pending",lists={resolve:doneList,reject:failList,notify:progressList},promise={done:doneList.add,fail:failList.add,progress:progressList.add,state:function(){return state;},isResolved:doneList.fired,isRejected:failList.fired,then:function(doneCallbacks,failCallbacks,progressCallbacks){deferred.done(doneCallbacks).fail(failCallbacks).progress(progressCallbacks);return this;},always:function(){deferred.done.apply(deferred,arguments).fail.apply(deferred,arguments);return this;},pipe:function(fnDone,fnFail,fnProgress){return OMjQuery.Deferred(function(newDefer){OMjQuery.each({done:[fnDone,"resolve"],fail:[fnFail,"reject"],progress:[fnProgress,"notify"]},function(handler,data){var fn=data[0],action=data[1],returned;if(OMjQuery.isFunction(fn)){deferred[handler](function(){returned=fn.apply(this,arguments);if(returned&&OMjQuery.isFunction(returned.promise)){returned.promise().then(newDefer.resolve,newDefer.reject,newDefer.notify);}else{newDefer[action+"With"](this===deferred?newDefer:this,[returned]);}});}else{deferred[handler](newDefer[action]);}});}).promise();},promise:function(obj){if(obj==null){obj=promise;}else{for(var key in promise){obj[key]=promise[key];}}
|
82
82
|
return obj;}},deferred=promise.promise({}),key;for(key in lists){deferred[key]=lists[key].fire;deferred[key+"With"]=lists[key].fireWith;}
|
83
83
|
deferred.done(function(){state="resolved";},failList.disable,progressList.lock).fail(function(){state="rejected";},doneList.disable,progressList.lock);if(func){func.call(deferred,deferred);}
|
84
|
-
return deferred;},when:function(firstParam){var args=sliceDeferred.call(arguments,0),i=0,length=args.length,pValues=new Array(length),count=length,pCount=length,deferred=length<=1&&firstParam&&
|
84
|
+
return deferred;},when:function(firstParam){var args=sliceDeferred.call(arguments,0),i=0,length=args.length,pValues=new Array(length),count=length,pCount=length,deferred=length<=1&&firstParam&&OMjQuery.isFunction(firstParam.promise)?firstParam:OMjQuery.Deferred(),promise=deferred.promise();function resolveFunc(i){return function(value){args[i]=arguments.length>1?sliceDeferred.call(arguments,0):value;if(!(--count)){deferred.resolveWith(deferred,args);}};}
|
85
85
|
function progressFunc(i){return function(value){pValues[i]=arguments.length>1?sliceDeferred.call(arguments,0):value;deferred.notifyWith(promise,pValues);};}
|
86
|
-
if(length>1){for(;i<length;i++){if(args[i]&&args[i].promise&&
|
86
|
+
if(length>1){for(;i<length;i++){if(args[i]&&args[i].promise&&OMjQuery.isFunction(args[i].promise)){args[i].promise().then(resolveFunc(i),deferred.reject,progressFunc(i));}else{--count;}}
|
87
87
|
if(!count){deferred.resolveWith(deferred,args);}}else if(deferred!==firstParam){deferred.resolveWith(deferred,length?[firstParam]:[]);}
|
88
|
-
return promise;}});
|
89
|
-
select=document.createElement("select");opt=select.appendChild(document.createElement("option"));input=div.getElementsByTagName("input")[0];support={leadingWhitespace:(div.firstChild.nodeType===3),tbody:!div.getElementsByTagName("tbody").length,htmlSerialize:!!div.getElementsByTagName("link").length,style:/top/.test(a.getAttribute("style")),hrefNormalized:(a.getAttribute("href")==="/a"),opacity:/^0.55/.test(a.style.opacity),cssFloat:!!a.style.cssFloat,checkOn:(input.value==="on"),optSelected:opt.selected,getSetAttribute:div.className!=="t",enctype:!!document.createElement("form").enctype,html5Clone:document.createElement("nav").cloneNode(true).outerHTML!=="<:nav></:nav>",submitBubbles:true,changeBubbles:true,focusinBubbles:false,deleteExpando:true,noCloneEvent:true,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableMarginRight:true,pixelMargin:true};
|
88
|
+
return promise;}});OMjQuery.support=(function(){var support,all,a,select,opt,input,fragment,tds,events,eventName,i,isSupported,div=document.createElement("div"),documentElement=document.documentElement;div.setAttribute("className","t");div.innerHTML=" <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>";all=div.getElementsByTagName("*");a=div.getElementsByTagName("a")[0];if(!all||!all.length||!a){return{};}
|
89
|
+
select=document.createElement("select");opt=select.appendChild(document.createElement("option"));input=div.getElementsByTagName("input")[0];support={leadingWhitespace:(div.firstChild.nodeType===3),tbody:!div.getElementsByTagName("tbody").length,htmlSerialize:!!div.getElementsByTagName("link").length,style:/top/.test(a.getAttribute("style")),hrefNormalized:(a.getAttribute("href")==="/a"),opacity:/^0.55/.test(a.style.opacity),cssFloat:!!a.style.cssFloat,checkOn:(input.value==="on"),optSelected:opt.selected,getSetAttribute:div.className!=="t",enctype:!!document.createElement("form").enctype,html5Clone:document.createElement("nav").cloneNode(true).outerHTML!=="<:nav></:nav>",submitBubbles:true,changeBubbles:true,focusinBubbles:false,deleteExpando:true,noCloneEvent:true,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableMarginRight:true,pixelMargin:true};OMjQuery.boxModel=support.boxModel=(document.compatMode==="CSS1Compat");input.checked=true;support.noCloneChecked=input.cloneNode(true).checked;select.disabled=true;support.optDisabled=!opt.disabled;try{delete div.test;}catch(e){support.deleteExpando=false;}
|
90
90
|
if(!div.addEventListener&&div.attachEvent&&div.fireEvent){div.attachEvent("onclick",function(){support.noCloneEvent=false;});div.cloneNode(true).fireEvent("onclick");}
|
91
91
|
input=document.createElement("input");input.value="t";input.setAttribute("type","radio");support.radioValue=input.value==="t";input.setAttribute("checked","checked");input.setAttribute("name","t");div.appendChild(input);fragment=document.createDocumentFragment();fragment.appendChild(div.lastChild);support.checkClone=fragment.cloneNode(true).cloneNode(true).lastChild.checked;support.appendChecked=input.checked;fragment.removeChild(input);fragment.appendChild(div);if(div.attachEvent){for(i in{submit:1,change:1,focusin:1}){eventName="on"+i;isSupported=(eventName in div);if(!isSupported){div.setAttribute(eventName,"return;");isSupported=(typeof div[eventName]==="function");}
|
92
92
|
support[i+"Bubbles"]=isSupported;}}
|
93
|
-
fragment.removeChild(div);fragment=select=opt=div=input=null;
|
93
|
+
fragment.removeChild(div);fragment=select=opt=div=input=null;OMjQuery(function(){var container,outer,inner,table,td,offsetSupport,marginDiv,conMarginTop,style,html,positionTopLeftWidthHeight,paddingMarginBorderVisibility,paddingMarginBorder,body=document.getElementsByTagName("body")[0];if(!body){return;}
|
94
94
|
conMarginTop=1;paddingMarginBorder="padding:0;margin:0;border:";positionTopLeftWidthHeight="position:absolute;top:0;left:0;width:1px;height:1px;";paddingMarginBorderVisibility=paddingMarginBorder+"0;visibility:hidden;";style="style='"+positionTopLeftWidthHeight+paddingMarginBorder+"5px solid #000;";html="<div "+style+"display:block;'><div style='"+paddingMarginBorder+"0;display:block;overflow:hidden;'></div></div>"+"<table "+style+"' cellpadding='0' cellspacing='0'>"+"<tr><td></td></tr></table>";container=document.createElement("div");container.style.cssText=paddingMarginBorderVisibility+"width:0;height:0;position:static;top:0;margin-top:"+conMarginTop+"px";body.insertBefore(container,body.firstChild);div=document.createElement("div");container.appendChild(div);div.innerHTML="<table><tr><td style='"+paddingMarginBorder+"0;display:none'></td><td>t</td></tr></table>";tds=div.getElementsByTagName("td");isSupported=(tds[0].offsetHeight===0);tds[0].style.display="";tds[1].style.display="none";support.reliableHiddenOffsets=isSupported&&(tds[0].offsetHeight===0);if(window.getComputedStyle){div.innerHTML="";marginDiv=document.createElement("div");marginDiv.style.width="0";marginDiv.style.marginRight="0";div.style.width="2px";div.appendChild(marginDiv);support.reliableMarginRight=(parseInt((window.getComputedStyle(marginDiv,null)||{marginRight:0}).marginRight,10)||0)===0;}
|
95
95
|
if(typeof div.style.zoom!=="undefined"){div.innerHTML="";div.style.width=div.style.padding="1px";div.style.border=0;div.style.overflow="hidden";div.style.display="inline";div.style.zoom=1;support.inlineBlockNeedsLayout=(div.offsetWidth===3);div.style.display="block";div.style.overflow="visible";div.innerHTML="<div style='width:5px;'></div>";support.shrinkWrapBlocks=(div.offsetWidth!==3);}
|
96
96
|
div.style.cssText=positionTopLeftWidthHeight+paddingMarginBorderVisibility;div.innerHTML=html;outer=div.firstChild;inner=outer.firstChild;td=outer.nextSibling.firstChild.firstChild;offsetSupport={doesNotAddBorder:(inner.offsetTop!==5),doesAddBorderForTableAndCells:(td.offsetTop===5)};inner.style.position="fixed";inner.style.top="20px";offsetSupport.fixedPosition=(inner.offsetTop===20||inner.offsetTop===15);inner.style.position=inner.style.top="";outer.style.overflow="hidden";outer.style.position="relative";offsetSupport.subtractsBorderForOverflowNotVisible=(inner.offsetTop===-5);offsetSupport.doesNotIncludeMarginInBodyOffset=(body.offsetTop!==conMarginTop);if(window.getComputedStyle){div.style.marginTop="1%";support.pixelMargin=(window.getComputedStyle(div,null)||{marginTop:0}).marginTop!=="1%";}
|
97
97
|
if(typeof container.style.zoom!=="undefined"){container.style.zoom=1;}
|
98
|
-
body.removeChild(container);marginDiv=div=container=null;
|
99
|
-
var privateCache,thisCache,ret,internalKey=
|
100
|
-
if(!id){if(isNode){elem[internalKey]=id=++
|
101
|
-
if(!cache[id]){cache[id]={};if(!isNode){cache[id].toJSON=
|
102
|
-
if(typeof name==="object"||typeof name==="function"){if(pvt){cache[id]=
|
98
|
+
body.removeChild(container);marginDiv=div=container=null;OMjQuery.extend(support,offsetSupport);});return support;})();var rbrace=/^(?:\{.*\}|\[.*\])$/,rmultiDash=/([A-Z])/g;OMjQuery.extend({cache:{},uuid:0,expando:"OMjQuery"+(OMjQuery.fn.jquery+Math.random()).replace(/\D/g,""),noData:{"embed":true,"object":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000","applet":true},hasData:function(elem){elem=elem.nodeType?OMjQuery.cache[elem[OMjQuery.expando]]:elem[OMjQuery.expando];return!!elem&&!isEmptyDataObject(elem);},data:function(elem,name,data,pvt){if(!OMjQuery.acceptData(elem)){return;}
|
99
|
+
var privateCache,thisCache,ret,internalKey=OMjQuery.expando,getByName=typeof name==="string",isNode=elem.nodeType,cache=isNode?OMjQuery.cache:elem,id=isNode?elem[internalKey]:elem[internalKey]&&internalKey,isEvents=name==="events";if((!id||!cache[id]||(!isEvents&&!pvt&&!cache[id].data))&&getByName&&data===undefined){return;}
|
100
|
+
if(!id){if(isNode){elem[internalKey]=id=++OMjQuery.uuid;}else{id=internalKey;}}
|
101
|
+
if(!cache[id]){cache[id]={};if(!isNode){cache[id].toJSON=OMjQuery.noop;}}
|
102
|
+
if(typeof name==="object"||typeof name==="function"){if(pvt){cache[id]=OMjQuery.extend(cache[id],name);}else{cache[id].data=OMjQuery.extend(cache[id].data,name);}}
|
103
103
|
privateCache=thisCache=cache[id];if(!pvt){if(!thisCache.data){thisCache.data={};}
|
104
104
|
thisCache=thisCache.data;}
|
105
|
-
if(data!==undefined){thisCache[
|
105
|
+
if(data!==undefined){thisCache[OMjQuery.camelCase(name)]=data;}
|
106
106
|
if(isEvents&&!thisCache[name]){return privateCache.events;}
|
107
|
-
if(getByName){ret=thisCache[name];if(ret==null){ret=thisCache[
|
108
|
-
return ret;},removeData:function(elem,name,pvt){if(!
|
109
|
-
var thisCache,i,l,internalKey=
|
110
|
-
if(name){thisCache=pvt?cache[id]:cache[id].data;if(thisCache){if(!
|
107
|
+
if(getByName){ret=thisCache[name];if(ret==null){ret=thisCache[OMjQuery.camelCase(name)];}}else{ret=thisCache;}
|
108
|
+
return ret;},removeData:function(elem,name,pvt){if(!OMjQuery.acceptData(elem)){return;}
|
109
|
+
var thisCache,i,l,internalKey=OMjQuery.expando,isNode=elem.nodeType,cache=isNode?OMjQuery.cache:elem,id=isNode?elem[internalKey]:internalKey;if(!cache[id]){return;}
|
110
|
+
if(name){thisCache=pvt?cache[id]:cache[id].data;if(thisCache){if(!OMjQuery.isArray(name)){if(name in thisCache){name=[name];}else{name=OMjQuery.camelCase(name);if(name in thisCache){name=[name];}else{name=name.split(" ");}}}
|
111
111
|
for(i=0,l=name.length;i<l;i++){delete thisCache[name[i]];}
|
112
|
-
if(!(pvt?isEmptyDataObject:
|
112
|
+
if(!(pvt?isEmptyDataObject:OMjQuery.isEmptyObject)(thisCache)){return;}}}
|
113
113
|
if(!pvt){delete cache[id].data;if(!isEmptyDataObject(cache[id])){return;}}
|
114
|
-
if(
|
115
|
-
if(isNode){if(
|
116
|
-
return true;}});
|
117
|
-
|
114
|
+
if(OMjQuery.support.deleteExpando||!cache.setInterval){delete cache[id];}else{cache[id]=null;}
|
115
|
+
if(isNode){if(OMjQuery.support.deleteExpando){delete elem[internalKey];}else if(elem.removeAttribute){elem.removeAttribute(internalKey);}else{elem[internalKey]=null;}}},_data:function(elem,name,data){return OMjQuery.data(elem,name,data,true);},acceptData:function(elem){if(elem.nodeName){var match=OMjQuery.noData[elem.nodeName.toLowerCase()];if(match){return!(match===true||elem.getAttribute("classid")!==match);}}
|
116
|
+
return true;}});OMjQuery.fn.extend({data:function(key,value){var parts,part,attr,name,l,elem=this[0],i=0,data=null;if(key===undefined){if(this.length){data=OMjQuery.data(elem);if(elem.nodeType===1&&!OMjQuery._data(elem,"parsedAttrs")){attr=elem.attributes;for(l=attr.length;i<l;i++){name=attr[i].name;if(name.indexOf("data-")===0){name=OMjQuery.camelCase(name.substring(5));dataAttr(elem,name,data[name]);}}
|
117
|
+
OMjQuery._data(elem,"parsedAttrs",true);}}
|
118
118
|
return data;}
|
119
|
-
if(typeof key==="object"){return this.each(function(){
|
120
|
-
parts=key.split(".",2);parts[1]=parts[1]?"."+parts[1]:"";part=parts[1]+"!";return
|
119
|
+
if(typeof key==="object"){return this.each(function(){OMjQuery.data(this,key);});}
|
120
|
+
parts=key.split(".",2);parts[1]=parts[1]?"."+parts[1]:"";part=parts[1]+"!";return OMjQuery.access(this,function(value){if(value===undefined){data=this.triggerHandler("getData"+part,[parts[0]]);if(data===undefined&&elem){data=OMjQuery.data(elem,key);data=dataAttr(elem,key,data);}
|
121
121
|
return data===undefined&&parts[1]?this.data(parts[0]):data;}
|
122
|
-
parts[1]=value;this.each(function(){var self=
|
123
|
-
|
122
|
+
parts[1]=value;this.each(function(){var self=OMjQuery(this);self.triggerHandler("setData"+part,parts);OMjQuery.data(this,key,value);self.triggerHandler("changeData"+part,parts);});},null,value,arguments.length>1,null,false);},removeData:function(key){return this.each(function(){OMjQuery.removeData(this,key);});}});function dataAttr(elem,key,data){if(data===undefined&&elem.nodeType===1){var name="data-"+key.replace(rmultiDash,"-$1").toLowerCase();data=elem.getAttribute(name);if(typeof data==="string"){try{data=data==="true"?true:data==="false"?false:data==="null"?null:OMjQuery.isNumeric(data)?+data:rbrace.test(data)?OMjQuery.parseJSON(data):data;}catch(e){}
|
123
|
+
OMjQuery.data(elem,key,data);}else{data=undefined;}}
|
124
124
|
return data;}
|
125
|
-
function isEmptyDataObject(obj){for(var name in obj){if(name==="data"&&
|
125
|
+
function isEmptyDataObject(obj){for(var name in obj){if(name==="data"&&OMjQuery.isEmptyObject(obj[name])){continue;}
|
126
126
|
if(name!=="toJSON"){return false;}}
|
127
127
|
return true;}
|
128
|
-
function handleQueueMarkDefer(elem,type,src){var deferDataKey=type+"defer",queueDataKey=type+"queue",markDataKey=type+"mark",defer=
|
129
|
-
|
130
|
-
if(elem){type=type||"fx";var key=type+"mark",count=force?0:((
|
131
|
-
return q||[];}},dequeue:function(elem,type){type=type||"fx";var queue=
|
128
|
+
function handleQueueMarkDefer(elem,type,src){var deferDataKey=type+"defer",queueDataKey=type+"queue",markDataKey=type+"mark",defer=OMjQuery._data(elem,deferDataKey);if(defer&&(src==="queue"||!OMjQuery._data(elem,queueDataKey))&&(src==="mark"||!OMjQuery._data(elem,markDataKey))){setTimeout(function(){if(!OMjQuery._data(elem,queueDataKey)&&!OMjQuery._data(elem,markDataKey)){OMjQuery.removeData(elem,deferDataKey,true);defer.fire();}},0);}}
|
129
|
+
OMjQuery.extend({_mark:function(elem,type){if(elem){type=(type||"fx")+"mark";OMjQuery._data(elem,type,(OMjQuery._data(elem,type)||0)+1);}},_unmark:function(force,elem,type){if(force!==true){type=elem;elem=force;force=false;}
|
130
|
+
if(elem){type=type||"fx";var key=type+"mark",count=force?0:((OMjQuery._data(elem,key)||1)-1);if(count){OMjQuery._data(elem,key,count);}else{OMjQuery.removeData(elem,key,true);handleQueueMarkDefer(elem,type,"mark");}}},queue:function(elem,type,data){var q;if(elem){type=(type||"fx")+"queue";q=OMjQuery._data(elem,type);if(data){if(!q||OMjQuery.isArray(data)){q=OMjQuery._data(elem,type,OMjQuery.makeArray(data));}else{q.push(data);}}
|
131
|
+
return q||[];}},dequeue:function(elem,type){type=type||"fx";var queue=OMjQuery.queue(elem,type),fn=queue.shift(),hooks={};if(fn==="inprogress"){fn=queue.shift();}
|
132
132
|
if(fn){if(type==="fx"){queue.unshift("inprogress");}
|
133
|
-
|
134
|
-
if(!queue.length){
|
135
|
-
if(arguments.length<setter){return
|
136
|
-
return data===undefined?this:this.each(function(){var queue=
|
137
|
-
type=type||"fx";var defer=
|
138
|
-
while(i--){if((tmp=
|
139
|
-
resolve();return defer.promise(object);}});var rclass=/[\n\t\r]/g,rspace=/\s+/,rreturn=/\r/g,rtype=/^(?:button|input)$/i,rfocusable=/^(?:button|input|object|select|textarea)$/i,rclickable=/^a(?:rea)?$/i,rboolean=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,getSetAttribute=
|
133
|
+
OMjQuery._data(elem,type+".run",hooks);fn.call(elem,function(){OMjQuery.dequeue(elem,type);},hooks);}
|
134
|
+
if(!queue.length){OMjQuery.removeData(elem,type+"queue "+type+".run",true);handleQueueMarkDefer(elem,type,"queue");}}});OMjQuery.fn.extend({queue:function(type,data){var setter=2;if(typeof type!=="string"){data=type;type="fx";setter--;}
|
135
|
+
if(arguments.length<setter){return OMjQuery.queue(this[0],type);}
|
136
|
+
return data===undefined?this:this.each(function(){var queue=OMjQuery.queue(this,type,data);if(type==="fx"&&queue[0]!=="inprogress"){OMjQuery.dequeue(this,type);}});},dequeue:function(type){return this.each(function(){OMjQuery.dequeue(this,type);});},delay:function(time,type){time=OMjQuery.fx?OMjQuery.fx.speeds[time]||time:time;type=type||"fx";return this.queue(type,function(next,hooks){var timeout=setTimeout(next,time);hooks.stop=function(){clearTimeout(timeout);};});},clearQueue:function(type){return this.queue(type||"fx",[]);},promise:function(type,object){if(typeof type!=="string"){object=type;type=undefined;}
|
137
|
+
type=type||"fx";var defer=OMjQuery.Deferred(),elements=this,i=elements.length,count=1,deferDataKey=type+"defer",queueDataKey=type+"queue",markDataKey=type+"mark",tmp;function resolve(){if(!(--count)){defer.resolveWith(elements,[elements]);}}
|
138
|
+
while(i--){if((tmp=OMjQuery.data(elements[i],deferDataKey,undefined,true)||(OMjQuery.data(elements[i],queueDataKey,undefined,true)||OMjQuery.data(elements[i],markDataKey,undefined,true))&&OMjQuery.data(elements[i],deferDataKey,OMjQuery.Callbacks("once memory"),true))){count++;tmp.add(resolve);}}
|
139
|
+
resolve();return defer.promise(object);}});var rclass=/[\n\t\r]/g,rspace=/\s+/,rreturn=/\r/g,rtype=/^(?:button|input)$/i,rfocusable=/^(?:button|input|object|select|textarea)$/i,rclickable=/^a(?:rea)?$/i,rboolean=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,getSetAttribute=OMjQuery.support.getSetAttribute,nodeHook,boolHook,fixSpecified;OMjQuery.fn.extend({attr:function(name,value){return OMjQuery.access(this,OMjQuery.attr,name,value,arguments.length>1);},removeAttr:function(name){return this.each(function(){OMjQuery.removeAttr(this,name);});},prop:function(name,value){return OMjQuery.access(this,OMjQuery.prop,name,value,arguments.length>1);},removeProp:function(name){name=OMjQuery.propFix[name]||name;return this.each(function(){try{this[name]=undefined;delete this[name];}catch(e){}});},addClass:function(value){var classNames,i,l,elem,setClass,c,cl;if(OMjQuery.isFunction(value)){return this.each(function(j){OMjQuery(this).addClass(value.call(this,j,this.className));});}
|
140
140
|
if(value&&typeof value==="string"){classNames=value.split(rspace);for(i=0,l=this.length;i<l;i++){elem=this[i];if(elem.nodeType===1){if(!elem.className&&classNames.length===1){elem.className=value;}else{setClass=" "+elem.className+" ";for(c=0,cl=classNames.length;c<cl;c++){if(!~setClass.indexOf(" "+classNames[c]+" ")){setClass+=classNames[c]+" ";}}
|
141
|
-
elem.className=
|
142
|
-
return this;},removeClass:function(value){var classNames,i,l,elem,className,c,cl;if(
|
141
|
+
elem.className=OMjQuery.trim(setClass);}}}}
|
142
|
+
return this;},removeClass:function(value){var classNames,i,l,elem,className,c,cl;if(OMjQuery.isFunction(value)){return this.each(function(j){OMjQuery(this).removeClass(value.call(this,j,this.className));});}
|
143
143
|
if((value&&typeof value==="string")||value===undefined){classNames=(value||"").split(rspace);for(i=0,l=this.length;i<l;i++){elem=this[i];if(elem.nodeType===1&&elem.className){if(value){className=(" "+elem.className+" ").replace(rclass," ");for(c=0,cl=classNames.length;c<cl;c++){className=className.replace(" "+classNames[c]+" "," ");}
|
144
|
-
elem.className=
|
145
|
-
return this;},toggleClass:function(value,stateVal){var type=typeof value,isBool=typeof stateVal==="boolean";if(
|
146
|
-
return this.each(function(){if(type==="string"){var className,i=0,self=
|
147
|
-
this.className=this.className||value===false?"":
|
148
|
-
return false;},val:function(value){var hooks,ret,isFunction,elem=this[0];if(!arguments.length){if(elem){hooks=
|
144
|
+
elem.className=OMjQuery.trim(className);}else{elem.className="";}}}}
|
145
|
+
return this;},toggleClass:function(value,stateVal){var type=typeof value,isBool=typeof stateVal==="boolean";if(OMjQuery.isFunction(value)){return this.each(function(i){OMjQuery(this).toggleClass(value.call(this,i,this.className,stateVal),stateVal);});}
|
146
|
+
return this.each(function(){if(type==="string"){var className,i=0,self=OMjQuery(this),state=stateVal,classNames=value.split(rspace);while((className=classNames[i++])){state=isBool?state:!self.hasClass(className);self[state?"addClass":"removeClass"](className);}}else if(type==="undefined"||type==="boolean"){if(this.className){OMjQuery._data(this,"__className__",this.className);}
|
147
|
+
this.className=this.className||value===false?"":OMjQuery._data(this,"__className__")||"";}});},hasClass:function(selector){var className=" "+selector+" ",i=0,l=this.length;for(;i<l;i++){if(this[i].nodeType===1&&(" "+this[i].className+" ").replace(rclass," ").indexOf(className)>-1){return true;}}
|
148
|
+
return false;},val:function(value){var hooks,ret,isFunction,elem=this[0];if(!arguments.length){if(elem){hooks=OMjQuery.valHooks[elem.type]||OMjQuery.valHooks[elem.nodeName.toLowerCase()];if(hooks&&"get"in hooks&&(ret=hooks.get(elem,"value"))!==undefined){return ret;}
|
149
149
|
ret=elem.value;return typeof ret==="string"?ret.replace(rreturn,""):ret==null?"":ret;}
|
150
150
|
return;}
|
151
|
-
isFunction=
|
151
|
+
isFunction=OMjQuery.isFunction(value);return this.each(function(i){var self=OMjQuery(this),val;if(this.nodeType!==1){return;}
|
152
152
|
if(isFunction){val=value.call(this,i,self.val());}else{val=value;}
|
153
|
-
if(val==null){val="";}else if(typeof val==="number"){val+="";}else if(
|
154
|
-
hooks=
|
155
|
-
i=one?index:0;max=one?index+1:options.length;for(;i<max;i++){option=options[i];if(option.selected&&(
|
153
|
+
if(val==null){val="";}else if(typeof val==="number"){val+="";}else if(OMjQuery.isArray(val)){val=OMjQuery.map(val,function(value){return value==null?"":value+"";});}
|
154
|
+
hooks=OMjQuery.valHooks[this.type]||OMjQuery.valHooks[this.nodeName.toLowerCase()];if(!hooks||!("set"in hooks)||hooks.set(this,val,"value")===undefined){this.value=val;}});}});OMjQuery.extend({valHooks:{option:{get:function(elem){var val=elem.attributes.value;return!val||val.specified?elem.value:elem.text;}},select:{get:function(elem){var value,i,max,option,index=elem.selectedIndex,values=[],options=elem.options,one=elem.type==="select-one";if(index<0){return null;}
|
155
|
+
i=one?index:0;max=one?index+1:options.length;for(;i<max;i++){option=options[i];if(option.selected&&(OMjQuery.support.optDisabled?!option.disabled:option.getAttribute("disabled")===null)&&(!option.parentNode.disabled||!OMjQuery.nodeName(option.parentNode,"optgroup"))){value=OMjQuery(option).val();if(one){return value;}
|
156
156
|
values.push(value);}}
|
157
|
-
if(one&&!values.length&&options.length){return
|
158
|
-
return values;},set:function(elem,value){var values=
|
157
|
+
if(one&&!values.length&&options.length){return OMjQuery(options[index]).val();}
|
158
|
+
return values;},set:function(elem,value){var values=OMjQuery.makeArray(value);OMjQuery(elem).find("option").each(function(){this.selected=OMjQuery.inArray(OMjQuery(this).val(),values)>=0;});if(!values.length){elem.selectedIndex=-1;}
|
159
159
|
return values;}}},attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(elem,name,value,pass){var ret,hooks,notxml,nType=elem.nodeType;if(!elem||nType===3||nType===8||nType===2){return;}
|
160
|
-
if(pass&&name in
|
161
|
-
if(typeof elem.getAttribute==="undefined"){return
|
162
|
-
notxml=nType!==1||!
|
163
|
-
if(value!==undefined){if(value===null){
|
164
|
-
elem.removeAttribute(getSetAttribute?name:propName);if(isBool&&propName in elem){elem[propName]=false;}}}}},attrHooks:{type:{set:function(elem,value){if(rtype.test(elem.nodeName)&&elem.parentNode){
|
165
|
-
return value;}}},value:{get:function(elem,name){if(nodeHook&&
|
166
|
-
return name in elem?elem.value:null;},set:function(elem,value,name){if(nodeHook&&
|
160
|
+
if(pass&&name in OMjQuery.attrFn){return OMjQuery(elem)[name](value);}
|
161
|
+
if(typeof elem.getAttribute==="undefined"){return OMjQuery.prop(elem,name,value);}
|
162
|
+
notxml=nType!==1||!OMjQuery.isXMLDoc(elem);if(notxml){name=name.toLowerCase();hooks=OMjQuery.attrHooks[name]||(rboolean.test(name)?boolHook:nodeHook);}
|
163
|
+
if(value!==undefined){if(value===null){OMjQuery.removeAttr(elem,name);return;}else if(hooks&&"set"in hooks&¬xml&&(ret=hooks.set(elem,value,name))!==undefined){return ret;}else{elem.setAttribute(name,""+value);return value;}}else if(hooks&&"get"in hooks&¬xml&&(ret=hooks.get(elem,name))!==null){return ret;}else{ret=elem.getAttribute(name);return ret===null?undefined:ret;}},removeAttr:function(elem,value){var propName,attrNames,name,l,isBool,i=0;if(value&&elem.nodeType===1){attrNames=value.toLowerCase().split(rspace);l=attrNames.length;for(;i<l;i++){name=attrNames[i];if(name){propName=OMjQuery.propFix[name]||name;isBool=rboolean.test(name);if(!isBool){OMjQuery.attr(elem,name,"");}
|
164
|
+
elem.removeAttribute(getSetAttribute?name:propName);if(isBool&&propName in elem){elem[propName]=false;}}}}},attrHooks:{type:{set:function(elem,value){if(rtype.test(elem.nodeName)&&elem.parentNode){OMjQuery.error("type property can't be changed");}else if(!OMjQuery.support.radioValue&&value==="radio"&&OMjQuery.nodeName(elem,"input")){var val=elem.value;elem.setAttribute("type",value);if(val){elem.value=val;}
|
165
|
+
return value;}}},value:{get:function(elem,name){if(nodeHook&&OMjQuery.nodeName(elem,"button")){return nodeHook.get(elem,name);}
|
166
|
+
return name in elem?elem.value:null;},set:function(elem,value,name){if(nodeHook&&OMjQuery.nodeName(elem,"button")){return nodeHook.set(elem,value,name);}
|
167
167
|
elem.value=value;}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(elem,name,value){var ret,hooks,notxml,nType=elem.nodeType;if(!elem||nType===3||nType===8||nType===2){return;}
|
168
|
-
notxml=nType!==1||!
|
169
|
-
if(value!==undefined){if(hooks&&"set"in hooks&&(ret=hooks.set(elem,value,name))!==undefined){return ret;}else{return(elem[name]=value);}}else{if(hooks&&"get"in hooks&&(ret=hooks.get(elem,name))!==null){return ret;}else{return elem[name];}}},propHooks:{tabIndex:{get:function(elem){var attributeNode=elem.getAttributeNode("tabindex");return attributeNode&&attributeNode.specified?parseInt(attributeNode.value,10):rfocusable.test(elem.nodeName)||rclickable.test(elem.nodeName)&&elem.href?0:undefined;}}}});
|
168
|
+
notxml=nType!==1||!OMjQuery.isXMLDoc(elem);if(notxml){name=OMjQuery.propFix[name]||name;hooks=OMjQuery.propHooks[name];}
|
169
|
+
if(value!==undefined){if(hooks&&"set"in hooks&&(ret=hooks.set(elem,value,name))!==undefined){return ret;}else{return(elem[name]=value);}}else{if(hooks&&"get"in hooks&&(ret=hooks.get(elem,name))!==null){return ret;}else{return elem[name];}}},propHooks:{tabIndex:{get:function(elem){var attributeNode=elem.getAttributeNode("tabindex");return attributeNode&&attributeNode.specified?parseInt(attributeNode.value,10):rfocusable.test(elem.nodeName)||rclickable.test(elem.nodeName)&&elem.href?0:undefined;}}}});OMjQuery.attrHooks.tabindex=OMjQuery.propHooks.tabIndex;boolHook={get:function(elem,name){var attrNode,property=OMjQuery.prop(elem,name);return property===true||typeof property!=="boolean"&&(attrNode=elem.getAttributeNode(name))&&attrNode.nodeValue!==false?name.toLowerCase():undefined;},set:function(elem,value,name){var propName;if(value===false){OMjQuery.removeAttr(elem,name);}else{propName=OMjQuery.propFix[name]||name;if(propName in elem){elem[propName]=true;}
|
170
170
|
elem.setAttribute(name,name.toLowerCase());}
|
171
|
-
return name;}};if(!getSetAttribute){fixSpecified={name:true,id:true,coords:true};nodeHook=
|
172
|
-
return(ret.nodeValue=value+"");}};
|
171
|
+
return name;}};if(!getSetAttribute){fixSpecified={name:true,id:true,coords:true};nodeHook=OMjQuery.valHooks.button={get:function(elem,name){var ret;ret=elem.getAttributeNode(name);return ret&&(fixSpecified[name]?ret.nodeValue!=="":ret.specified)?ret.nodeValue:undefined;},set:function(elem,value,name){var ret=elem.getAttributeNode(name);if(!ret){ret=document.createAttribute(name);elem.setAttributeNode(ret);}
|
172
|
+
return(ret.nodeValue=value+"");}};OMjQuery.attrHooks.tabindex.set=nodeHook.set;OMjQuery.each(["width","height"],function(i,name){OMjQuery.attrHooks[name]=OMjQuery.extend(OMjQuery.attrHooks[name],{set:function(elem,value){if(value===""){elem.setAttribute(name,"auto");return value;}}});});OMjQuery.attrHooks.contenteditable={get:nodeHook.get,set:function(elem,value,name){if(value===""){value="false";}
|
173
173
|
nodeHook.set(elem,value,name);}};}
|
174
|
-
if(!
|
175
|
-
if(!
|
176
|
-
if(!
|
174
|
+
if(!OMjQuery.support.hrefNormalized){OMjQuery.each(["href","src","width","height"],function(i,name){OMjQuery.attrHooks[name]=OMjQuery.extend(OMjQuery.attrHooks[name],{get:function(elem){var ret=elem.getAttribute(name,2);return ret===null?undefined:ret;}});});}
|
175
|
+
if(!OMjQuery.support.style){OMjQuery.attrHooks.style={get:function(elem){return elem.style.cssText.toLowerCase()||undefined;},set:function(elem,value){return(elem.style.cssText=""+value);}};}
|
176
|
+
if(!OMjQuery.support.optSelected){OMjQuery.propHooks.selected=OMjQuery.extend(OMjQuery.propHooks.selected,{get:function(elem){var parent=elem.parentNode;if(parent){parent.selectedIndex;if(parent.parentNode){parent.parentNode.selectedIndex;}}
|
177
177
|
return null;}});}
|
178
|
-
if(!
|
179
|
-
if(!
|
180
|
-
|
181
|
-
return quick;},quickIs=function(elem,m){var attrs=elem.attributes||{};return((!m[1]||elem.nodeName.toLowerCase()===m[1])&&(!m[2]||(attrs.id||{}).value===m[2])&&(!m[3]||m[3].test((attrs["class"]||{}).value)));},hoverHack=function(events){return
|
178
|
+
if(!OMjQuery.support.enctype){OMjQuery.propFix.enctype="encoding";}
|
179
|
+
if(!OMjQuery.support.checkOn){OMjQuery.each(["radio","checkbox"],function(){OMjQuery.valHooks[this]={get:function(elem){return elem.getAttribute("value")===null?"on":elem.value;}};});}
|
180
|
+
OMjQuery.each(["radio","checkbox"],function(){OMjQuery.valHooks[this]=OMjQuery.extend(OMjQuery.valHooks[this],{set:function(elem,value){if(OMjQuery.isArray(value)){return(elem.checked=OMjQuery.inArray(OMjQuery(elem).val(),value)>=0);}}});});var rformElems=/^(?:textarea|input|select)$/i,rtypenamespace=/^([^\.]*)?(?:\.(.+))?$/,rhoverHack=/(?:^|\s)hover(\.\S+)?\b/,rkeyEvent=/^key/,rmouseEvent=/^(?:mouse|contextmenu)|click/,rfocusMorph=/^(?:focusinfocus|focusoutblur)$/,rquickIs=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,quickParse=function(selector){var quick=rquickIs.exec(selector);if(quick){quick[1]=(quick[1]||"").toLowerCase();quick[3]=quick[3]&&new RegExp("(?:^|\\s)"+quick[3]+"(?:\\s|$)");}
|
181
|
+
return quick;},quickIs=function(elem,m){var attrs=elem.attributes||{};return((!m[1]||elem.nodeName.toLowerCase()===m[1])&&(!m[2]||(attrs.id||{}).value===m[2])&&(!m[3]||m[3].test((attrs["class"]||{}).value)));},hoverHack=function(events){return OMjQuery.event.special.hover?events:events.replace(rhoverHack,"mouseenter$1 mouseleave$1");};OMjQuery.event={add:function(elem,types,handler,data,selector){var elemData,eventHandle,events,t,tns,type,namespaces,handleObj,handleObjIn,quick,handlers,special;if(elem.nodeType===3||elem.nodeType===8||!types||!handler||!(elemData=OMjQuery._data(elem))){return;}
|
182
182
|
if(handler.handler){handleObjIn=handler;handler=handleObjIn.handler;selector=handleObjIn.selector;}
|
183
|
-
if(!handler.guid){handler.guid=
|
183
|
+
if(!handler.guid){handler.guid=OMjQuery.guid++;}
|
184
184
|
events=elemData.events;if(!events){elemData.events=events={};}
|
185
|
-
eventHandle=elemData.handle;if(!eventHandle){elemData.handle=eventHandle=function(e){return typeof
|
186
|
-
types=
|
185
|
+
eventHandle=elemData.handle;if(!eventHandle){elemData.handle=eventHandle=function(e){return typeof OMjQuery!=="undefined"&&(!e||OMjQuery.event.triggered!==e.type)?OMjQuery.event.dispatch.apply(eventHandle.elem,arguments):undefined;};eventHandle.elem=elem;}
|
186
|
+
types=OMjQuery.trim(hoverHack(types)).split(" ");for(t=0;t<types.length;t++){tns=rtypenamespace.exec(types[t])||[];type=tns[1];namespaces=(tns[2]||"").split(".").sort();special=OMjQuery.event.special[type]||{};type=(selector?special.delegateType:special.bindType)||type;special=OMjQuery.event.special[type]||{};handleObj=OMjQuery.extend({type:type,origType:tns[1],data:data,handler:handler,guid:handler.guid,selector:selector,quick:selector&&quickParse(selector),namespace:namespaces.join(".")},handleObjIn);handlers=events[type];if(!handlers){handlers=events[type]=[];handlers.delegateCount=0;if(!special.setup||special.setup.call(elem,data,namespaces,eventHandle)===false){if(elem.addEventListener){elem.addEventListener(type,eventHandle,false);}else if(elem.attachEvent){elem.attachEvent("on"+type,eventHandle);}}}
|
187
187
|
if(special.add){special.add.call(elem,handleObj);if(!handleObj.handler.guid){handleObj.handler.guid=handler.guid;}}
|
188
188
|
if(selector){handlers.splice(handlers.delegateCount++,0,handleObj);}else{handlers.push(handleObj);}
|
189
|
-
|
190
|
-
elem=null;},global:{},remove:function(elem,types,handler,selector,mappedTypes){var elemData=
|
191
|
-
types=
|
189
|
+
OMjQuery.event.global[type]=true;}
|
190
|
+
elem=null;},global:{},remove:function(elem,types,handler,selector,mappedTypes){var elemData=OMjQuery.hasData(elem)&&OMjQuery._data(elem),t,tns,type,origType,namespaces,origCount,j,events,special,handle,eventType,handleObj;if(!elemData||!(events=elemData.events)){return;}
|
191
|
+
types=OMjQuery.trim(hoverHack(types||"")).split(" ");for(t=0;t<types.length;t++){tns=rtypenamespace.exec(types[t])||[];type=origType=tns[1];namespaces=tns[2];if(!type){for(type in events){OMjQuery.event.remove(elem,type+types[t],handler,selector,true);}
|
192
192
|
continue;}
|
193
|
-
special=
|
193
|
+
special=OMjQuery.event.special[type]||{};type=(selector?special.delegateType:special.bindType)||type;eventType=events[type]||[];origCount=eventType.length;namespaces=namespaces?new RegExp("(^|\\.)"+namespaces.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null;for(j=0;j<eventType.length;j++){handleObj=eventType[j];if((mappedTypes||origType===handleObj.origType)&&(!handler||handler.guid===handleObj.guid)&&(!namespaces||namespaces.test(handleObj.namespace))&&(!selector||selector===handleObj.selector||selector==="**"&&handleObj.selector)){eventType.splice(j--,1);if(handleObj.selector){eventType.delegateCount--;}
|
194
194
|
if(special.remove){special.remove.call(elem,handleObj);}}}
|
195
|
-
if(eventType.length===0&&origCount!==eventType.length){if(!special.teardown||special.teardown.call(elem,namespaces)===false){
|
195
|
+
if(eventType.length===0&&origCount!==eventType.length){if(!special.teardown||special.teardown.call(elem,namespaces)===false){OMjQuery.removeEvent(elem,type,elemData.handle);}
|
196
196
|
delete events[type];}}
|
197
|
-
if(
|
198
|
-
|
199
|
-
var type=event.type||event,namespaces=[],cache,exclusive,i,cur,old,ontype,special,handle,eventPath,bubbleType;if(rfocusMorph.test(type+
|
197
|
+
if(OMjQuery.isEmptyObject(events)){handle=elemData.handle;if(handle){handle.elem=null;}
|
198
|
+
OMjQuery.removeData(elem,["events","handle"],true);}},customEvent:{"getData":true,"setData":true,"changeData":true},trigger:function(event,data,elem,onlyHandlers){if(elem&&(elem.nodeType===3||elem.nodeType===8)){return;}
|
199
|
+
var type=event.type||event,namespaces=[],cache,exclusive,i,cur,old,ontype,special,handle,eventPath,bubbleType;if(rfocusMorph.test(type+OMjQuery.event.triggered)){return;}
|
200
200
|
if(type.indexOf("!")>=0){type=type.slice(0,-1);exclusive=true;}
|
201
201
|
if(type.indexOf(".")>=0){namespaces=type.split(".");type=namespaces.shift();namespaces.sort();}
|
202
|
-
if((!elem||
|
203
|
-
event=typeof event==="object"?event[
|
202
|
+
if((!elem||OMjQuery.event.customEvent[type])&&!OMjQuery.event.global[type]){return;}
|
203
|
+
event=typeof event==="object"?event[OMjQuery.expando]?event:new OMjQuery.Event(type,event):new OMjQuery.Event(type);event.type=type;event.isTrigger=true;event.exclusive=exclusive;event.namespace=namespaces.join(".");event.namespace_re=event.namespace?new RegExp("(^|\\.)"+namespaces.join("\\.(?:.*\\.)?")+"(\\.|$)"):null;ontype=type.indexOf(":")<0?"on"+type:"";if(!elem){cache=OMjQuery.cache;for(i in cache){if(cache[i].events&&cache[i].events[type]){OMjQuery.event.trigger(event,data,cache[i].handle.elem,true);}}
|
204
204
|
return;}
|
205
205
|
event.result=undefined;if(!event.target){event.target=elem;}
|
206
|
-
data=data!=null?
|
207
|
-
eventPath=[[elem,special.bindType||type]];if(!onlyHandlers&&!special.noBubble&&!
|
206
|
+
data=data!=null?OMjQuery.makeArray(data):[];data.unshift(event);special=OMjQuery.event.special[type]||{};if(special.trigger&&special.trigger.apply(elem,data)===false){return;}
|
207
|
+
eventPath=[[elem,special.bindType||type]];if(!onlyHandlers&&!special.noBubble&&!OMjQuery.isWindow(elem)){bubbleType=special.delegateType||type;cur=rfocusMorph.test(bubbleType+type)?elem:elem.parentNode;old=null;for(;cur;cur=cur.parentNode){eventPath.push([cur,bubbleType]);old=cur;}
|
208
208
|
if(old&&old===elem.ownerDocument){eventPath.push([old.defaultView||old.parentWindow||window,bubbleType]);}}
|
209
|
-
for(i=0;i<eventPath.length&&!event.isPropagationStopped();i++){cur=eventPath[i][0];event.type=eventPath[i][1];handle=(
|
210
|
-
handle=ontype&&cur[ontype];if(handle&&
|
211
|
-
event.type=type;if(!onlyHandlers&&!event.isDefaultPrevented()){if((!special._default||special._default.apply(elem.ownerDocument,data)===false)&&!(type==="click"&&
|
212
|
-
|
213
|
-
return event.result;},dispatch:function(event){event=
|
214
|
-
if(delegateCount&&!(event.button&&event.type==="click")){jqcur=
|
209
|
+
for(i=0;i<eventPath.length&&!event.isPropagationStopped();i++){cur=eventPath[i][0];event.type=eventPath[i][1];handle=(OMjQuery._data(cur,"events")||{})[event.type]&&OMjQuery._data(cur,"handle");if(handle){handle.apply(cur,data);}
|
210
|
+
handle=ontype&&cur[ontype];if(handle&&OMjQuery.acceptData(cur)&&handle.apply(cur,data)===false){event.preventDefault();}}
|
211
|
+
event.type=type;if(!onlyHandlers&&!event.isDefaultPrevented()){if((!special._default||special._default.apply(elem.ownerDocument,data)===false)&&!(type==="click"&&OMjQuery.nodeName(elem,"a"))&&OMjQuery.acceptData(elem)){if(ontype&&elem[type]&&((type!=="focus"&&type!=="blur")||event.target.offsetWidth!==0)&&!OMjQuery.isWindow(elem)){old=elem[ontype];if(old){elem[ontype]=null;}
|
212
|
+
OMjQuery.event.triggered=type;elem[type]();OMjQuery.event.triggered=undefined;if(old){elem[ontype]=old;}}}}
|
213
|
+
return event.result;},dispatch:function(event){event=OMjQuery.event.fix(event||window.event);var handlers=((OMjQuery._data(this,"events")||{})[event.type]||[]),delegateCount=handlers.delegateCount,args=[].slice.call(arguments,0),run_all=!event.exclusive&&!event.namespace,special=OMjQuery.event.special[event.type]||{},handlerQueue=[],i,j,cur,jqcur,ret,selMatch,matched,matches,handleObj,sel,related;args[0]=event;event.delegateTarget=this;if(special.preDispatch&&special.preDispatch.call(this,event)===false){return;}
|
214
|
+
if(delegateCount&&!(event.button&&event.type==="click")){jqcur=OMjQuery(this);jqcur.context=this.ownerDocument||this;for(cur=event.target;cur!=this;cur=cur.parentNode||this){if(cur.disabled!==true){selMatch={};matches=[];jqcur[0]=cur;for(i=0;i<delegateCount;i++){handleObj=handlers[i];sel=handleObj.selector;if(selMatch[sel]===undefined){selMatch[sel]=(handleObj.quick?quickIs(cur,handleObj.quick):jqcur.is(sel));}
|
215
215
|
if(selMatch[sel]){matches.push(handleObj);}}
|
216
216
|
if(matches.length){handlerQueue.push({elem:cur,matches:matches});}}}}
|
217
217
|
if(handlers.length>delegateCount){handlerQueue.push({elem:this,matches:handlers.slice(delegateCount)});}
|
218
|
-
for(i=0;i<handlerQueue.length&&!event.isPropagationStopped();i++){matched=handlerQueue[i];event.currentTarget=matched.elem;for(j=0;j<matched.matches.length&&!event.isImmediatePropagationStopped();j++){handleObj=matched.matches[j];if(run_all||(!event.namespace&&!handleObj.namespace)||event.namespace_re&&event.namespace_re.test(handleObj.namespace)){event.data=handleObj.data;event.handleObj=handleObj;ret=((
|
218
|
+
for(i=0;i<handlerQueue.length&&!event.isPropagationStopped();i++){matched=handlerQueue[i];event.currentTarget=matched.elem;for(j=0;j<matched.matches.length&&!event.isImmediatePropagationStopped();j++){handleObj=matched.matches[j];if(run_all||(!event.namespace&&!handleObj.namespace)||event.namespace_re&&event.namespace_re.test(handleObj.namespace)){event.data=handleObj.data;event.handleObj=handleObj;ret=((OMjQuery.event.special[handleObj.origType]||{}).handle||handleObj.handler).apply(matched.elem,args);if(ret!==undefined){event.result=ret;if(ret===false){event.preventDefault();event.stopPropagation();}}}}}
|
219
219
|
if(special.postDispatch){special.postDispatch.call(this,event);}
|
220
220
|
return event.result;},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(event,original){if(event.which==null){event.which=original.charCode!=null?original.charCode:original.keyCode;}
|
221
221
|
return event;}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(event,original){var eventDoc,doc,body,button=original.button,fromElement=original.fromElement;if(event.pageX==null&&original.clientX!=null){eventDoc=event.target.ownerDocument||document;doc=eventDoc.documentElement;body=eventDoc.body;event.pageX=original.clientX+(doc&&doc.scrollLeft||body&&body.scrollLeft||0)-(doc&&doc.clientLeft||body&&body.clientLeft||0);event.pageY=original.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc&&doc.clientTop||body&&body.clientTop||0);}
|
222
222
|
if(!event.relatedTarget&&fromElement){event.relatedTarget=fromElement===event.target?original.toElement:fromElement;}
|
223
223
|
if(!event.which&&button!==undefined){event.which=(button&1?1:(button&2?3:(button&4?2:0)));}
|
224
|
-
return event;}},fix:function(event){if(event[
|
225
|
-
var i,prop,originalEvent=event,fixHook=
|
224
|
+
return event;}},fix:function(event){if(event[OMjQuery.expando]){return event;}
|
225
|
+
var i,prop,originalEvent=event,fixHook=OMjQuery.event.fixHooks[event.type]||{},copy=fixHook.props?this.props.concat(fixHook.props):this.props;event=OMjQuery.Event(originalEvent);for(i=copy.length;i;){prop=copy[--i];event[prop]=originalEvent[prop];}
|
226
226
|
if(!event.target){event.target=originalEvent.srcElement||document;}
|
227
227
|
if(event.target.nodeType===3){event.target=event.target.parentNode;}
|
228
228
|
if(event.metaKey===undefined){event.metaKey=event.ctrlKey;}
|
229
|
-
return fixHook.filter?fixHook.filter(event,originalEvent):event;},special:{ready:{setup:
|
230
|
-
if(e.isDefaultPrevented()){event.preventDefault();}}};
|
229
|
+
return fixHook.filter?fixHook.filter(event,originalEvent):event;},special:{ready:{setup:OMjQuery.bindReady},load:{noBubble:true},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(data,namespaces,eventHandle){if(OMjQuery.isWindow(this)){this.onbeforeunload=eventHandle;}},teardown:function(namespaces,eventHandle){if(this.onbeforeunload===eventHandle){this.onbeforeunload=null;}}}},simulate:function(type,elem,event,bubble){var e=OMjQuery.extend(new OMjQuery.Event(),event,{type:type,isSimulated:true,originalEvent:{}});if(bubble){OMjQuery.event.trigger(e,null,elem);}else{OMjQuery.event.dispatch.call(elem,e);}
|
230
|
+
if(e.isDefaultPrevented()){event.preventDefault();}}};OMjQuery.event.handle=OMjQuery.event.dispatch;OMjQuery.removeEvent=document.removeEventListener?function(elem,type,handle){if(elem.removeEventListener){elem.removeEventListener(type,handle,false);}}:function(elem,type,handle){if(elem.detachEvent){elem.detachEvent("on"+type,handle);}};OMjQuery.Event=function(src,props){if(!(this instanceof OMjQuery.Event)){return new OMjQuery.Event(src,props);}
|
231
231
|
if(src&&src.type){this.originalEvent=src;this.type=src.type;this.isDefaultPrevented=(src.defaultPrevented||src.returnValue===false||src.getPreventDefault&&src.getPreventDefault())?returnTrue:returnFalse;}else{this.type=src;}
|
232
|
-
if(props){
|
233
|
-
this.timeStamp=src&&src.timeStamp||
|
232
|
+
if(props){OMjQuery.extend(this,props);}
|
233
|
+
this.timeStamp=src&&src.timeStamp||OMjQuery.now();this[OMjQuery.expando]=true;};function returnFalse(){return false;}
|
234
234
|
function returnTrue(){return true;}
|
235
|
-
|
235
|
+
OMjQuery.Event.prototype={preventDefault:function(){this.isDefaultPrevented=returnTrue;var e=this.originalEvent;if(!e){return;}
|
236
236
|
if(e.preventDefault){e.preventDefault();}else{e.returnValue=false;}},stopPropagation:function(){this.isPropagationStopped=returnTrue;var e=this.originalEvent;if(!e){return;}
|
237
237
|
if(e.stopPropagation){e.stopPropagation();}
|
238
|
-
e.cancelBubble=true;},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=returnTrue;this.stopPropagation();},isDefaultPrevented:returnFalse,isPropagationStopped:returnFalse,isImmediatePropagationStopped:returnFalse};
|
239
|
-
return ret;}};});if(!
|
240
|
-
|
241
|
-
|
242
|
-
if(!
|
238
|
+
e.cancelBubble=true;},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=returnTrue;this.stopPropagation();},isDefaultPrevented:returnFalse,isPropagationStopped:returnFalse,isImmediatePropagationStopped:returnFalse};OMjQuery.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(orig,fix){OMjQuery.event.special[orig]={delegateType:fix,bindType:fix,handle:function(event){var target=this,related=event.relatedTarget,handleObj=event.handleObj,selector=handleObj.selector,ret;if(!related||(related!==target&&!OMjQuery.contains(target,related))){event.type=handleObj.origType;ret=handleObj.handler.apply(this,arguments);event.type=fix;}
|
239
|
+
return ret;}};});if(!OMjQuery.support.submitBubbles){OMjQuery.event.special.submit={setup:function(){if(OMjQuery.nodeName(this,"form")){return false;}
|
240
|
+
OMjQuery.event.add(this,"click._submit keypress._submit",function(e){var elem=e.target,form=OMjQuery.nodeName(elem,"input")||OMjQuery.nodeName(elem,"button")?elem.form:undefined;if(form&&!form._submit_attached){OMjQuery.event.add(form,"submit._submit",function(event){event._submit_bubble=true;});form._submit_attached=true;}});},postDispatch:function(event){if(event._submit_bubble){delete event._submit_bubble;if(this.parentNode&&!event.isTrigger){OMjQuery.event.simulate("submit",this.parentNode,event,true);}}},teardown:function(){if(OMjQuery.nodeName(this,"form")){return false;}
|
241
|
+
OMjQuery.event.remove(this,"._submit");}};}
|
242
|
+
if(!OMjQuery.support.changeBubbles){OMjQuery.event.special.change={setup:function(){if(rformElems.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio"){OMjQuery.event.add(this,"propertychange._change",function(event){if(event.originalEvent.propertyName==="checked"){this._just_changed=true;}});OMjQuery.event.add(this,"click._change",function(event){if(this._just_changed&&!event.isTrigger){this._just_changed=false;OMjQuery.event.simulate("change",this,event,true);}});}
|
243
243
|
return false;}
|
244
|
-
|
245
|
-
if(!
|
246
|
-
|
244
|
+
OMjQuery.event.add(this,"beforeactivate._change",function(e){var elem=e.target;if(rformElems.test(elem.nodeName)&&!elem._change_attached){OMjQuery.event.add(elem,"change._change",function(event){if(this.parentNode&&!event.isSimulated&&!event.isTrigger){OMjQuery.event.simulate("change",this.parentNode,event,true);}});elem._change_attached=true;}});},handle:function(event){var elem=event.target;if(this!==elem||event.isSimulated||event.isTrigger||(elem.type!=="radio"&&elem.type!=="checkbox")){return event.handleObj.handler.apply(this,arguments);}},teardown:function(){OMjQuery.event.remove(this,"._change");return rformElems.test(this.nodeName);}};}
|
245
|
+
if(!OMjQuery.support.focusinBubbles){OMjQuery.each({focus:"focusin",blur:"focusout"},function(orig,fix){var attaches=0,handler=function(event){OMjQuery.event.simulate(fix,event.target,OMjQuery.event.fix(event),true);};OMjQuery.event.special[fix]={setup:function(){if(attaches++===0){document.addEventListener(orig,handler,true);}},teardown:function(){if(--attaches===0){document.removeEventListener(orig,handler,true);}}};});}
|
246
|
+
OMjQuery.fn.extend({on:function(types,selector,data,fn,one){var origFn,type;if(typeof types==="object"){if(typeof selector!=="string"){data=data||selector;selector=undefined;}
|
247
247
|
for(type in types){this.on(type,selector,data,types[type],one);}
|
248
248
|
return this;}
|
249
249
|
if(data==null&&fn==null){fn=selector;data=selector=undefined;}else if(fn==null){if(typeof selector==="string"){fn=data;data=undefined;}else{fn=data;data=selector;selector=undefined;}}
|
250
250
|
if(fn===false){fn=returnFalse;}else if(!fn){return this;}
|
251
|
-
if(one===1){origFn=fn;fn=function(event){
|
252
|
-
return this.each(function(){
|
251
|
+
if(one===1){origFn=fn;fn=function(event){OMjQuery().off(event);return origFn.apply(this,arguments);};fn.guid=origFn.guid||(origFn.guid=OMjQuery.guid++);}
|
252
|
+
return this.each(function(){OMjQuery.event.add(this,types,fn,data,selector);});},one:function(types,selector,data,fn){return this.on(types,selector,data,fn,1);},off:function(types,selector,fn){if(types&&types.preventDefault&&types.handleObj){var handleObj=types.handleObj;OMjQuery(types.delegateTarget).off(handleObj.namespace?handleObj.origType+"."+handleObj.namespace:handleObj.origType,handleObj.selector,handleObj.handler);return this;}
|
253
253
|
if(typeof types==="object"){for(var type in types){this.off(type,selector,types[type]);}
|
254
254
|
return this;}
|
255
255
|
if(selector===false||typeof selector==="function"){fn=selector;selector=undefined;}
|
256
256
|
if(fn===false){fn=returnFalse;}
|
257
|
-
return this.each(function(){
|
258
|
-
return this.click(toggler);},hover:function(fnOver,fnOut){return this.mouseenter(fnOver).mouseleave(fnOut||fnOver);}});
|
259
|
-
return arguments.length>0?this.on(name,null,data,fn):this.trigger(name);};if(
|
260
|
-
if(rkeyEvent.test(name)){
|
261
|
-
if(rmouseEvent.test(name)){
|
257
|
+
return this.each(function(){OMjQuery.event.remove(this,types,fn,selector);});},bind:function(types,data,fn){return this.on(types,null,data,fn);},unbind:function(types,fn){return this.off(types,null,fn);},live:function(types,data,fn){OMjQuery(this.context).on(types,this.selector,data,fn);return this;},die:function(types,fn){OMjQuery(this.context).off(types,this.selector||"**",fn);return this;},delegate:function(selector,types,data,fn){return this.on(types,selector,data,fn);},undelegate:function(selector,types,fn){return arguments.length==1?this.off(selector,"**"):this.off(types,selector,fn);},trigger:function(type,data){return this.each(function(){OMjQuery.event.trigger(type,data,this);});},triggerHandler:function(type,data){if(this[0]){return OMjQuery.event.trigger(type,data,this[0],true);}},toggle:function(fn){var args=arguments,guid=fn.guid||OMjQuery.guid++,i=0,toggler=function(event){var lastToggle=(OMjQuery._data(this,"lastToggle"+fn.guid)||0)%i;OMjQuery._data(this,"lastToggle"+fn.guid,lastToggle+1);event.preventDefault();return args[lastToggle].apply(this,arguments)||false;};toggler.guid=guid;while(i<args.length){args[i++].guid=guid;}
|
258
|
+
return this.click(toggler);},hover:function(fnOver,fnOut){return this.mouseenter(fnOver).mouseleave(fnOut||fnOver);}});OMjQuery.each(("blur focus focusin focusout load resize scroll unload click dblclick "+"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave "+"change select submit keydown keypress keyup error contextmenu").split(" "),function(i,name){OMjQuery.fn[name]=function(data,fn){if(fn==null){fn=data;data=null;}
|
259
|
+
return arguments.length>0?this.on(name,null,data,fn):this.trigger(name);};if(OMjQuery.attrFn){OMjQuery.attrFn[name]=true;}
|
260
|
+
if(rkeyEvent.test(name)){OMjQuery.event.fixHooks[name]=OMjQuery.event.keyHooks;}
|
261
|
+
if(rmouseEvent.test(name)){OMjQuery.event.fixHooks[name]=OMjQuery.event.mouseHooks;}});(function(){var chunker=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,expando="sizcache"+(Math.random()+'').replace('.',''),done=0,toString=Object.prototype.toString,hasDuplicate=false,baseHasDuplicate=true,rBackslash=/\\/g,rReturn=/\r\n/g,rNonWord=/\W/;[0,0].sort(function(){baseHasDuplicate=false;return 0;});var Sizzle=function(selector,context,results,seed){results=results||[];context=context||document;var origContext=context;if(context.nodeType!==1&&context.nodeType!==9){return[];}
|
262
262
|
if(!selector||typeof selector!=="string"){return results;}
|
263
263
|
var m,set,checkSet,extra,ret,cur,pop,i,prune=true,contextXML=Sizzle.isXML(context),parts=[],soFar=selector;do{chunker.exec("");m=chunker.exec(soFar);if(m){soFar=m[3];parts.push(m[1]);if(m[2]){extra=m[3];break;}}}while(m);if(parts.length>1&&origPOS.exec(selector)){if(parts.length===2&&Expr.relative[parts[0]]){set=posProcess(parts[0]+parts[1],context,seed);}else{set=Expr.relative[parts[0]]?[context]:Sizzle(parts.shift(),context);while(parts.length){selector=parts.shift();if(Expr.relative[selector]){selector+=parts.shift();}
|
264
264
|
set=posProcess(selector,set,seed);}}}else{if(!seed&&parts.length>1&&context.nodeType===9&&!contextXML&&Expr.match.ID.test(parts[0])&&!Expr.match.ID.test(parts[parts.length-1])){ret=Sizzle.find(parts.shift(),context,contextXML);context=ret.expr?Sizzle.filter(ret.expr,ret.set)[0]:ret.set[0];}
|
@@ -353,164 +353,164 @@ checkSet[i]=match;}}}
|
|
353
353
|
if(document.documentElement.contains){Sizzle.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):true);};}else if(document.documentElement.compareDocumentPosition){Sizzle.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16);};}else{Sizzle.contains=function(){return false;};}
|
354
354
|
Sizzle.isXML=function(elem){var documentElement=(elem?elem.ownerDocument||elem:0).documentElement;return documentElement?documentElement.nodeName!=="HTML":false;};var posProcess=function(selector,context,seed){var match,tmpSet=[],later="",root=context.nodeType?[context]:context;while((match=Expr.match.PSEUDO.exec(selector))){later+=match[0];selector=selector.replace(Expr.match.PSEUDO,"");}
|
355
355
|
selector=Expr.relative[selector]?selector+"*":selector;for(var i=0,l=root.length;i<l;i++){Sizzle(selector,root[i],tmpSet,seed);}
|
356
|
-
return Sizzle.filter(later,tmpSet);};Sizzle.attr=
|
357
|
-
var ret=this.pushStack("","find",selector),length,n,r;for(i=0,l=this.length;i<l;i++){length=ret.length;
|
358
|
-
return ret;},has:function(target){var targets=
|
356
|
+
return Sizzle.filter(later,tmpSet);};Sizzle.attr=OMjQuery.attr;Sizzle.selectors.attrMap={};OMjQuery.find=Sizzle;OMjQuery.expr=Sizzle.selectors;OMjQuery.expr[":"]=OMjQuery.expr.filters;OMjQuery.unique=Sizzle.uniqueSort;OMjQuery.text=Sizzle.getText;OMjQuery.isXMLDoc=Sizzle.isXML;OMjQuery.contains=Sizzle.contains;})();var runtil=/Until$/,rparentsprev=/^(?:parents|prevUntil|prevAll)/,rmultiselector=/,/,isSimple=/^.[^:#\[\.,]*$/,slice=Array.prototype.slice,POS=OMjQuery.expr.match.globalPOS,guaranteedUnique={children:true,contents:true,next:true,prev:true};OMjQuery.fn.extend({find:function(selector){var self=this,i,l;if(typeof selector!=="string"){return OMjQuery(selector).filter(function(){for(i=0,l=self.length;i<l;i++){if(OMjQuery.contains(self[i],this)){return true;}}});}
|
357
|
+
var ret=this.pushStack("","find",selector),length,n,r;for(i=0,l=this.length;i<l;i++){length=ret.length;OMjQuery.find(selector,this[i],ret);if(i>0){for(n=length;n<ret.length;n++){for(r=0;r<length;r++){if(ret[r]===ret[n]){ret.splice(n--,1);break;}}}}}
|
358
|
+
return ret;},has:function(target){var targets=OMjQuery(target);return this.filter(function(){for(var i=0,l=targets.length;i<l;i++){if(OMjQuery.contains(this,targets[i])){return true;}}});},not:function(selector){return this.pushStack(winnow(this,selector,false),"not",selector);},filter:function(selector){return this.pushStack(winnow(this,selector,true),"filter",selector);},is:function(selector){return!!selector&&(typeof selector==="string"?POS.test(selector)?OMjQuery(selector,this.context).index(this[0])>=0:OMjQuery.filter(selector,this).length>0:this.filter(selector).length>0);},closest:function(selectors,context){var ret=[],i,l,cur=this[0];if(OMjQuery.isArray(selectors)){var level=1;while(cur&&cur.ownerDocument&&cur!==context){for(i=0;i<selectors.length;i++){if(OMjQuery(cur).is(selectors[i])){ret.push({selector:selectors[i],elem:cur,level:level});}}
|
359
359
|
cur=cur.parentNode;level++;}
|
360
360
|
return ret;}
|
361
|
-
var pos=POS.test(selectors)||typeof selectors!=="string"?
|
362
|
-
ret=ret.length>1?
|
363
|
-
if(typeof elem==="string"){return
|
364
|
-
return
|
365
|
-
|
366
|
-
if(selector&&typeof selector==="string"){ret=
|
367
|
-
ret=this.length>1&&!guaranteedUnique[name]?
|
368
|
-
return this.pushStack(ret,name,slice.call(arguments).join(","));};});
|
369
|
-
return elems.length===1?
|
361
|
+
var pos=POS.test(selectors)||typeof selectors!=="string"?OMjQuery(selectors,context||this.context):0;for(i=0,l=this.length;i<l;i++){cur=this[i];while(cur){if(pos?pos.index(cur)>-1:OMjQuery.find.matchesSelector(cur,selectors)){ret.push(cur);break;}else{cur=cur.parentNode;if(!cur||!cur.ownerDocument||cur===context||cur.nodeType===11){break;}}}}
|
362
|
+
ret=ret.length>1?OMjQuery.unique(ret):ret;return this.pushStack(ret,"closest",selectors);},index:function(elem){if(!elem){return(this[0]&&this[0].parentNode)?this.prevAll().length:-1;}
|
363
|
+
if(typeof elem==="string"){return OMjQuery.inArray(this[0],OMjQuery(elem));}
|
364
|
+
return OMjQuery.inArray(elem.jquery?elem[0]:elem,this);},add:function(selector,context){var set=typeof selector==="string"?OMjQuery(selector,context):OMjQuery.makeArray(selector&&selector.nodeType?[selector]:selector),all=OMjQuery.merge(this.get(),set);return this.pushStack(isDisconnected(set[0])||isDisconnected(all[0])?all:OMjQuery.unique(all));},andSelf:function(){return this.add(this.prevObject);}});function isDisconnected(node){return!node||!node.parentNode||node.parentNode.nodeType===11;}
|
365
|
+
OMjQuery.each({parent:function(elem){var parent=elem.parentNode;return parent&&parent.nodeType!==11?parent:null;},parents:function(elem){return OMjQuery.dir(elem,"parentNode");},parentsUntil:function(elem,i,until){return OMjQuery.dir(elem,"parentNode",until);},next:function(elem){return OMjQuery.nth(elem,2,"nextSibling");},prev:function(elem){return OMjQuery.nth(elem,2,"previousSibling");},nextAll:function(elem){return OMjQuery.dir(elem,"nextSibling");},prevAll:function(elem){return OMjQuery.dir(elem,"previousSibling");},nextUntil:function(elem,i,until){return OMjQuery.dir(elem,"nextSibling",until);},prevUntil:function(elem,i,until){return OMjQuery.dir(elem,"previousSibling",until);},siblings:function(elem){return OMjQuery.sibling((elem.parentNode||{}).firstChild,elem);},children:function(elem){return OMjQuery.sibling(elem.firstChild);},contents:function(elem){return OMjQuery.nodeName(elem,"iframe")?elem.contentDocument||elem.contentWindow.document:OMjQuery.makeArray(elem.childNodes);}},function(name,fn){OMjQuery.fn[name]=function(until,selector){var ret=OMjQuery.map(this,fn,until);if(!runtil.test(name)){selector=until;}
|
366
|
+
if(selector&&typeof selector==="string"){ret=OMjQuery.filter(selector,ret);}
|
367
|
+
ret=this.length>1&&!guaranteedUnique[name]?OMjQuery.unique(ret):ret;if((this.length>1||rmultiselector.test(selector))&&rparentsprev.test(name)){ret=ret.reverse();}
|
368
|
+
return this.pushStack(ret,name,slice.call(arguments).join(","));};});OMjQuery.extend({filter:function(expr,elems,not){if(not){expr=":not("+expr+")";}
|
369
|
+
return elems.length===1?OMjQuery.find.matchesSelector(elems[0],expr)?[elems[0]]:[]:OMjQuery.find.matches(expr,elems);},dir:function(elem,dir,until){var matched=[],cur=elem[dir];while(cur&&cur.nodeType!==9&&(until===undefined||cur.nodeType!==1||!OMjQuery(cur).is(until))){if(cur.nodeType===1){matched.push(cur);}
|
370
370
|
cur=cur[dir];}
|
371
371
|
return matched;},nth:function(cur,result,dir,elem){result=result||1;var num=0;for(;cur;cur=cur[dir]){if(cur.nodeType===1&&++num===result){break;}}
|
372
372
|
return cur;},sibling:function(n,elem){var r=[];for(;n;n=n.nextSibling){if(n.nodeType===1&&n!==elem){r.push(n);}}
|
373
|
-
return r;}});function winnow(elements,qualifier,keep){qualifier=qualifier||0;if(
|
374
|
-
return
|
373
|
+
return r;}});function winnow(elements,qualifier,keep){qualifier=qualifier||0;if(OMjQuery.isFunction(qualifier)){return OMjQuery.grep(elements,function(elem,i){var retVal=!!qualifier.call(elem,i,elem);return retVal===keep;});}else if(qualifier.nodeType){return OMjQuery.grep(elements,function(elem,i){return(elem===qualifier)===keep;});}else if(typeof qualifier==="string"){var filtered=OMjQuery.grep(elements,function(elem){return elem.nodeType===1;});if(isSimple.test(qualifier)){return OMjQuery.filter(qualifier,filtered,!keep);}else{qualifier=OMjQuery.filter(qualifier,filtered);}}
|
374
|
+
return OMjQuery.grep(elements,function(elem,i){return(OMjQuery.inArray(elem,qualifier)>=0)===keep;});}
|
375
375
|
function createSafeFragment(document){var list=nodeNames.split("|"),safeFrag=document.createDocumentFragment();if(safeFrag.createElement){while(list.length){safeFrag.createElement(list.pop());}}
|
376
376
|
return safeFrag;}
|
377
|
-
var nodeNames="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|"+"header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",
|
378
|
-
|
379
|
-
if(this[0]){var wrap=
|
377
|
+
var nodeNames="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|"+"header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",rinlineOMjQuery=/ OMjQuery\d+="(?:\d+|null)"/g,rleadingWhitespace=/^\s+/,rxhtmlTag=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,rtagName=/<([\w:]+)/,rtbody=/<tbody/i,rhtml=/<|&#?\w+;/,rnoInnerhtml=/<(?:script|style)/i,rnocache=/<(?:script|object|embed|option|style)/i,rnoshimcache=new RegExp("<(?:"+nodeNames+")[\\s/>]","i"),rchecked=/checked\s*(?:[^=]|=\s*.checked.)/i,rscriptType=/\/(java|ecma)script/i,rcleanScript=/^\s*<!(?:\[CDATA\[|\-\-)/,wrapMap={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},safeFragment=createSafeFragment(document);wrapMap.optgroup=wrapMap.option;wrapMap.tbody=wrapMap.tfoot=wrapMap.colgroup=wrapMap.caption=wrapMap.thead;wrapMap.th=wrapMap.td;if(!OMjQuery.support.htmlSerialize){wrapMap._default=[1,"div<div>","</div>"];}
|
378
|
+
OMjQuery.fn.extend({text:function(value){return OMjQuery.access(this,function(value){return value===undefined?OMjQuery.text(this):this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(value));},null,value,arguments.length);},wrapAll:function(html){if(OMjQuery.isFunction(html)){return this.each(function(i){OMjQuery(this).wrapAll(html.call(this,i));});}
|
379
|
+
if(this[0]){var wrap=OMjQuery(html,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){wrap.insertBefore(this[0]);}
|
380
380
|
wrap.map(function(){var elem=this;while(elem.firstChild&&elem.firstChild.nodeType===1){elem=elem.firstChild;}
|
381
381
|
return elem;}).append(this);}
|
382
|
-
return this;},wrapInner:function(html){if(
|
383
|
-
return this.each(function(){var self=
|
382
|
+
return this;},wrapInner:function(html){if(OMjQuery.isFunction(html)){return this.each(function(i){OMjQuery(this).wrapInner(html.call(this,i));});}
|
383
|
+
return this.each(function(){var self=OMjQuery(this),contents=self.contents();if(contents.length){contents.wrapAll(html);}else{self.append(html);}});},wrap:function(html){var isFunction=OMjQuery.isFunction(html);return this.each(function(i){OMjQuery(this).wrapAll(isFunction?html.call(this,i):html);});},unwrap:function(){return this.parent().each(function(){if(!OMjQuery.nodeName(this,"body")){OMjQuery(this).replaceWith(this.childNodes);}}).end();},append:function(){return this.domManip(arguments,true,function(elem){if(this.nodeType===1){this.appendChild(elem);}});},prepend:function(){return this.domManip(arguments,true,function(elem){if(this.nodeType===1){this.insertBefore(elem,this.firstChild);}});},before:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(elem){this.parentNode.insertBefore(elem,this);});}else if(arguments.length){var set=OMjQuery.clean(arguments);set.push.apply(set,this.toArray());return this.pushStack(set,"before",arguments);}},after:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(elem){this.parentNode.insertBefore(elem,this.nextSibling);});}else if(arguments.length){var set=this.pushStack(this,"after",arguments);set.push.apply(set,OMjQuery.clean(arguments));return set;}},remove:function(selector,keepData){for(var i=0,elem;(elem=this[i])!=null;i++){if(!selector||OMjQuery.filter(selector,[elem]).length){if(!keepData&&elem.nodeType===1){OMjQuery.cleanData(elem.getElementsByTagName("*"));OMjQuery.cleanData([elem]);}
|
384
384
|
if(elem.parentNode){elem.parentNode.removeChild(elem);}}}
|
385
|
-
return this;},empty:function(){for(var i=0,elem;(elem=this[i])!=null;i++){if(elem.nodeType===1){
|
385
|
+
return this;},empty:function(){for(var i=0,elem;(elem=this[i])!=null;i++){if(elem.nodeType===1){OMjQuery.cleanData(elem.getElementsByTagName("*"));}
|
386
386
|
while(elem.firstChild){elem.removeChild(elem.firstChild);}}
|
387
|
-
return this;},clone:function(dataAndEvents,deepDataAndEvents){dataAndEvents=dataAndEvents==null?false:dataAndEvents;deepDataAndEvents=deepDataAndEvents==null?dataAndEvents:deepDataAndEvents;return this.map(function(){return
|
388
|
-
if(typeof value==="string"&&!rnoInnerhtml.test(value)&&(
|
387
|
+
return this;},clone:function(dataAndEvents,deepDataAndEvents){dataAndEvents=dataAndEvents==null?false:dataAndEvents;deepDataAndEvents=deepDataAndEvents==null?dataAndEvents:deepDataAndEvents;return this.map(function(){return OMjQuery.clone(this,dataAndEvents,deepDataAndEvents);});},html:function(value){return OMjQuery.access(this,function(value){var elem=this[0]||{},i=0,l=this.length;if(value===undefined){return elem.nodeType===1?elem.innerHTML.replace(rinlineOMjQuery,""):null;}
|
388
|
+
if(typeof value==="string"&&!rnoInnerhtml.test(value)&&(OMjQuery.support.leadingWhitespace||!rleadingWhitespace.test(value))&&!wrapMap[(rtagName.exec(value)||["",""])[1].toLowerCase()]){value=value.replace(rxhtmlTag,"<$1></$2>");try{for(;i<l;i++){elem=this[i]||{};if(elem.nodeType===1){OMjQuery.cleanData(elem.getElementsByTagName("*"));elem.innerHTML=value;}}
|
389
389
|
elem=0;}catch(e){}}
|
390
|
-
if(elem){this.empty().append(value);}},null,value,arguments.length);},replaceWith:function(value){if(this[0]&&this[0].parentNode){if(
|
391
|
-
if(typeof value!=="string"){value=
|
392
|
-
return this.each(function(){var next=this.nextSibling,parent=this.parentNode;
|
393
|
-
if(
|
394
|
-
if(this[0]){parent=value&&value.parentNode;if(
|
390
|
+
if(elem){this.empty().append(value);}},null,value,arguments.length);},replaceWith:function(value){if(this[0]&&this[0].parentNode){if(OMjQuery.isFunction(value)){return this.each(function(i){var self=OMjQuery(this),old=self.html();self.replaceWith(value.call(this,i,old));});}
|
391
|
+
if(typeof value!=="string"){value=OMjQuery(value).detach();}
|
392
|
+
return this.each(function(){var next=this.nextSibling,parent=this.parentNode;OMjQuery(this).remove();if(next){OMjQuery(next).before(value);}else{OMjQuery(parent).append(value);}});}else{return this.length?this.pushStack(OMjQuery(OMjQuery.isFunction(value)?value():value),"replaceWith",value):this;}},detach:function(selector){return this.remove(selector,true);},domManip:function(args,table,callback){var results,first,fragment,parent,value=args[0],scripts=[];if(!OMjQuery.support.checkClone&&arguments.length===3&&typeof value==="string"&&rchecked.test(value)){return this.each(function(){OMjQuery(this).domManip(args,table,callback,true);});}
|
393
|
+
if(OMjQuery.isFunction(value)){return this.each(function(i){var self=OMjQuery(this);args[0]=value.call(this,i,table?self.html():undefined);self.domManip(args,table,callback);});}
|
394
|
+
if(this[0]){parent=value&&value.parentNode;if(OMjQuery.support.parentNode&&parent&&parent.nodeType===11&&parent.childNodes.length===this.length){results={fragment:parent};}else{results=OMjQuery.buildFragment(args,this,scripts);}
|
395
395
|
fragment=results.fragment;if(fragment.childNodes.length===1){first=fragment=fragment.firstChild;}else{first=fragment.firstChild;}
|
396
|
-
if(first){table=table&&
|
397
|
-
if(scripts.length){
|
396
|
+
if(first){table=table&&OMjQuery.nodeName(first,"tr");for(var i=0,l=this.length,lastIndex=l-1;i<l;i++){callback.call(table?root(this[i],first):this[i],results.cacheable||(l>1&&i<lastIndex)?OMjQuery.clone(fragment,true,true):fragment);}}
|
397
|
+
if(scripts.length){OMjQuery.each(scripts,function(i,elem){if(elem.src){OMjQuery.ajax({type:"GET",global:false,url:elem.src,async:false,dataType:"script"});}else{OMjQuery.globalEval((elem.text||elem.textContent||elem.innerHTML||"").replace(rcleanScript,"/*$0*/"));}
|
398
398
|
if(elem.parentNode){elem.parentNode.removeChild(elem);}});}}
|
399
|
-
return this;}});function root(elem,cur){return
|
400
|
-
function cloneCopyEvent(src,dest){if(dest.nodeType!==1||!
|
401
|
-
var type,i,l,oldData=
|
402
|
-
if(curData.data){curData.data=
|
399
|
+
return this;}});function root(elem,cur){return OMjQuery.nodeName(elem,"table")?(elem.getElementsByTagName("tbody")[0]||elem.appendChild(elem.ownerDocument.createElement("tbody"))):elem;}
|
400
|
+
function cloneCopyEvent(src,dest){if(dest.nodeType!==1||!OMjQuery.hasData(src)){return;}
|
401
|
+
var type,i,l,oldData=OMjQuery._data(src),curData=OMjQuery._data(dest,oldData),events=oldData.events;if(events){delete curData.handle;curData.events={};for(type in events){for(i=0,l=events[type].length;i<l;i++){OMjQuery.event.add(dest,type,events[type][i]);}}}
|
402
|
+
if(curData.data){curData.data=OMjQuery.extend({},curData.data);}}
|
403
403
|
function cloneFixAttributes(src,dest){var nodeName;if(dest.nodeType!==1){return;}
|
404
404
|
if(dest.clearAttributes){dest.clearAttributes();}
|
405
405
|
if(dest.mergeAttributes){dest.mergeAttributes(src);}
|
406
406
|
nodeName=dest.nodeName.toLowerCase();if(nodeName==="object"){dest.outerHTML=src.outerHTML;}else if(nodeName==="input"&&(src.type==="checkbox"||src.type==="radio")){if(src.checked){dest.defaultChecked=dest.checked=src.checked;}
|
407
407
|
if(dest.value!==src.value){dest.value=src.value;}}else if(nodeName==="option"){dest.selected=src.defaultSelected;}else if(nodeName==="input"||nodeName==="textarea"){dest.defaultValue=src.defaultValue;}else if(nodeName==="script"&&dest.text!==src.text){dest.text=src.text;}
|
408
|
-
dest.removeAttribute(
|
409
|
-
|
408
|
+
dest.removeAttribute(OMjQuery.expando);dest.removeAttribute("_submit_attached");dest.removeAttribute("_change_attached");}
|
409
|
+
OMjQuery.buildFragment=function(args,nodes,scripts){var fragment,cacheable,cacheresults,doc,first=args[0];if(nodes&&nodes[0]){doc=nodes[0].ownerDocument||nodes[0];}
|
410
410
|
if(!doc.createDocumentFragment){doc=document;}
|
411
|
-
if(args.length===1&&typeof first==="string"&&first.length<512&&doc===document&&first.charAt(0)==="<"&&!rnocache.test(first)&&(
|
412
|
-
if(!fragment){fragment=doc.createDocumentFragment();
|
413
|
-
if(cacheable){
|
414
|
-
return{fragment:fragment,cacheable:cacheable};};
|
411
|
+
if(args.length===1&&typeof first==="string"&&first.length<512&&doc===document&&first.charAt(0)==="<"&&!rnocache.test(first)&&(OMjQuery.support.checkClone||!rchecked.test(first))&&(OMjQuery.support.html5Clone||!rnoshimcache.test(first))){cacheable=true;cacheresults=OMjQuery.fragments[first];if(cacheresults&&cacheresults!==1){fragment=cacheresults;}}
|
412
|
+
if(!fragment){fragment=doc.createDocumentFragment();OMjQuery.clean(args,doc,fragment,scripts);}
|
413
|
+
if(cacheable){OMjQuery.fragments[first]=cacheresults?fragment:1;}
|
414
|
+
return{fragment:fragment,cacheable:cacheable};};OMjQuery.fragments={};OMjQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(name,original){OMjQuery.fn[name]=function(selector){var ret=[],insert=OMjQuery(selector),parent=this.length===1&&this[0].parentNode;if(parent&&parent.nodeType===11&&parent.childNodes.length===1&&insert.length===1){insert[original](this[0]);return this;}else{for(var i=0,l=insert.length;i<l;i++){var elems=(i>0?this.clone(true):this).get();OMjQuery(insert[i])[original](elems);ret=ret.concat(elems);}
|
415
415
|
return this.pushStack(ret,name,insert.selector);}};});function getAll(elem){if(typeof elem.getElementsByTagName!=="undefined"){return elem.getElementsByTagName("*");}else if(typeof elem.querySelectorAll!=="undefined"){return elem.querySelectorAll("*");}else{return[];}}
|
416
416
|
function fixDefaultChecked(elem){if(elem.type==="checkbox"||elem.type==="radio"){elem.defaultChecked=elem.checked;}}
|
417
|
-
function findInputs(elem){var nodeName=(elem.nodeName||"").toLowerCase();if(nodeName==="input"){fixDefaultChecked(elem);}else if(nodeName!=="script"&&typeof elem.getElementsByTagName!=="undefined"){
|
417
|
+
function findInputs(elem){var nodeName=(elem.nodeName||"").toLowerCase();if(nodeName==="input"){fixDefaultChecked(elem);}else if(nodeName!=="script"&&typeof elem.getElementsByTagName!=="undefined"){OMjQuery.grep(elem.getElementsByTagName("input"),fixDefaultChecked);}}
|
418
418
|
function shimCloneNode(elem){var div=document.createElement("div");safeFragment.appendChild(div);div.innerHTML=elem.outerHTML;return div.firstChild;}
|
419
|
-
|
419
|
+
OMjQuery.extend({clone:function(elem,dataAndEvents,deepDataAndEvents){var srcElements,destElements,i,clone=OMjQuery.support.html5Clone||OMjQuery.isXMLDoc(elem)||!rnoshimcache.test("<"+elem.nodeName+">")?elem.cloneNode(true):shimCloneNode(elem);if((!OMjQuery.support.noCloneEvent||!OMjQuery.support.noCloneChecked)&&(elem.nodeType===1||elem.nodeType===11)&&!OMjQuery.isXMLDoc(elem)){cloneFixAttributes(elem,clone);srcElements=getAll(elem);destElements=getAll(clone);for(i=0;srcElements[i];++i){if(destElements[i]){cloneFixAttributes(srcElements[i],destElements[i]);}}}
|
420
420
|
if(dataAndEvents){cloneCopyEvent(elem,clone);if(deepDataAndEvents){srcElements=getAll(elem);destElements=getAll(clone);for(i=0;srcElements[i];++i){cloneCopyEvent(srcElements[i],destElements[i]);}}}
|
421
421
|
srcElements=destElements=null;return clone;},clean:function(elems,context,fragment,scripts){var checkScriptType,script,j,ret=[];context=context||document;if(typeof context.createElement==="undefined"){context=context.ownerDocument||context[0]&&context[0].ownerDocument||document;}
|
422
422
|
for(var i=0,elem;(elem=elems[i])!=null;i++){if(typeof elem==="number"){elem+="";}
|
423
423
|
if(!elem){continue;}
|
424
424
|
if(typeof elem==="string"){if(!rhtml.test(elem)){elem=context.createTextNode(elem);}else{elem=elem.replace(rxhtmlTag,"<$1></$2>");var tag=(rtagName.exec(elem)||["",""])[1].toLowerCase(),wrap=wrapMap[tag]||wrapMap._default,depth=wrap[0],div=context.createElement("div"),safeChildNodes=safeFragment.childNodes,remove;if(context===document){safeFragment.appendChild(div);}else{createSafeFragment(context).appendChild(div);}
|
425
425
|
div.innerHTML=wrap[1]+elem+wrap[2];while(depth--){div=div.lastChild;}
|
426
|
-
if(!
|
427
|
-
if(!
|
426
|
+
if(!OMjQuery.support.tbody){var hasBody=rtbody.test(elem),tbody=tag==="table"&&!hasBody?div.firstChild&&div.firstChild.childNodes:wrap[1]==="<table>"&&!hasBody?div.childNodes:[];for(j=tbody.length-1;j>=0;--j){if(OMjQuery.nodeName(tbody[j],"tbody")&&!tbody[j].childNodes.length){tbody[j].parentNode.removeChild(tbody[j]);}}}
|
427
|
+
if(!OMjQuery.support.leadingWhitespace&&rleadingWhitespace.test(elem)){div.insertBefore(context.createTextNode(rleadingWhitespace.exec(elem)[0]),div.firstChild);}
|
428
428
|
elem=div.childNodes;if(div){div.parentNode.removeChild(div);if(safeChildNodes.length>0){remove=safeChildNodes[safeChildNodes.length-1];if(remove&&remove.parentNode){remove.parentNode.removeChild(remove);}}}}}
|
429
|
-
var len;if(!
|
430
|
-
if(elem.nodeType){ret.push(elem);}else{ret=
|
431
|
-
if(fragment){checkScriptType=function(elem){return!elem.type||rscriptType.test(elem.type);};for(i=0;ret[i];i++){script=ret[i];if(scripts&&
|
429
|
+
var len;if(!OMjQuery.support.appendChecked){if(elem[0]&&typeof(len=elem.length)==="number"){for(j=0;j<len;j++){findInputs(elem[j]);}}else{findInputs(elem);}}
|
430
|
+
if(elem.nodeType){ret.push(elem);}else{ret=OMjQuery.merge(ret,elem);}}
|
431
|
+
if(fragment){checkScriptType=function(elem){return!elem.type||rscriptType.test(elem.type);};for(i=0;ret[i];i++){script=ret[i];if(scripts&&OMjQuery.nodeName(script,"script")&&(!script.type||rscriptType.test(script.type))){scripts.push(script.parentNode?script.parentNode.removeChild(script):script);}else{if(script.nodeType===1){var jsTags=OMjQuery.grep(script.getElementsByTagName("script"),checkScriptType);ret.splice.apply(ret,[i+1,0].concat(jsTags));}
|
432
432
|
fragment.appendChild(script);}}}
|
433
|
-
return ret;},cleanData:function(elems){var data,id,cache=
|
434
|
-
id=elem[
|
433
|
+
return ret;},cleanData:function(elems){var data,id,cache=OMjQuery.cache,special=OMjQuery.event.special,deleteExpando=OMjQuery.support.deleteExpando;for(var i=0,elem;(elem=elems[i])!=null;i++){if(elem.nodeName&&OMjQuery.noData[elem.nodeName.toLowerCase()]){continue;}
|
434
|
+
id=elem[OMjQuery.expando];if(id){data=cache[id];if(data&&data.events){for(var type in data.events){if(special[type]){OMjQuery.event.remove(elem,type);}else{OMjQuery.removeEvent(elem,type,data.handle);}}
|
435
435
|
if(data.handle){data.handle.elem=null;}}
|
436
|
-
if(deleteExpando){delete elem[
|
437
|
-
delete cache[id];}}}});var ralpha=/alpha\([^)]*\)/i,ropacity=/opacity=([^)]*)/,rupper=/([A-Z]|^ms)/g,rnum=/^[\-+]?(?:\d*\.)?\d+$/i,rnumnonpx=/^-?(?:\d*\.)?\d+(?!px)[^\d\s]+$/i,rrelNum=/^([\-+])=([\-+.\de]+)/,rmargin=/^margin/,cssShow={position:"absolute",visibility:"hidden",display:"block"},cssExpand=["Top","Right","Bottom","Left"],curCSS,getComputedStyle,currentStyle;
|
438
|
-
var ret,type,origName=
|
436
|
+
if(deleteExpando){delete elem[OMjQuery.expando];}else if(elem.removeAttribute){elem.removeAttribute(OMjQuery.expando);}
|
437
|
+
delete cache[id];}}}});var ralpha=/alpha\([^)]*\)/i,ropacity=/opacity=([^)]*)/,rupper=/([A-Z]|^ms)/g,rnum=/^[\-+]?(?:\d*\.)?\d+$/i,rnumnonpx=/^-?(?:\d*\.)?\d+(?!px)[^\d\s]+$/i,rrelNum=/^([\-+])=([\-+.\de]+)/,rmargin=/^margin/,cssShow={position:"absolute",visibility:"hidden",display:"block"},cssExpand=["Top","Right","Bottom","Left"],curCSS,getComputedStyle,currentStyle;OMjQuery.fn.css=function(name,value){return OMjQuery.access(this,function(elem,name,value){return value!==undefined?OMjQuery.style(elem,name,value):OMjQuery.css(elem,name);},name,value,arguments.length>1);};OMjQuery.extend({cssHooks:{opacity:{get:function(elem,computed){if(computed){var ret=curCSS(elem,"opacity");return ret===""?"1":ret;}else{return elem.style.opacity;}}}},cssNumber:{"fillOpacity":true,"fontWeight":true,"lineHeight":true,"opacity":true,"orphans":true,"widows":true,"zIndex":true,"zoom":true},cssProps:{"float":OMjQuery.support.cssFloat?"cssFloat":"styleFloat"},style:function(elem,name,value,extra){if(!elem||elem.nodeType===3||elem.nodeType===8||!elem.style){return;}
|
438
|
+
var ret,type,origName=OMjQuery.camelCase(name),style=elem.style,hooks=OMjQuery.cssHooks[origName];name=OMjQuery.cssProps[origName]||origName;if(value!==undefined){type=typeof value;if(type==="string"&&(ret=rrelNum.exec(value))){value=(+(ret[1]+1)*+ret[2])+parseFloat(OMjQuery.css(elem,name));type="number";}
|
439
439
|
if(value==null||type==="number"&&isNaN(value)){return;}
|
440
|
-
if(type==="number"&&!
|
440
|
+
if(type==="number"&&!OMjQuery.cssNumber[origName]){value+="px";}
|
441
441
|
if(!hooks||!("set"in hooks)||(value=hooks.set(elem,value))!==undefined){try{style[name]=value;}catch(e){}}}else{if(hooks&&"get"in hooks&&(ret=hooks.get(elem,false,extra))!==undefined){return ret;}
|
442
|
-
return style[name];}},css:function(elem,name,extra){var ret,hooks;name=
|
442
|
+
return style[name];}},css:function(elem,name,extra){var ret,hooks;name=OMjQuery.camelCase(name);hooks=OMjQuery.cssHooks[name];name=OMjQuery.cssProps[name]||name;if(name==="cssFloat"){name="float";}
|
443
443
|
if(hooks&&"get"in hooks&&(ret=hooks.get(elem,true,extra))!==undefined){return ret;}else if(curCSS){return curCSS(elem,name);}},swap:function(elem,options,callback){var old={},ret,name;for(name in options){old[name]=elem.style[name];elem.style[name]=options[name];}
|
444
444
|
ret=callback.call(elem);for(name in options){elem.style[name]=old[name];}
|
445
|
-
return ret;}});
|
446
|
-
if(!
|
445
|
+
return ret;}});OMjQuery.curCSS=OMjQuery.css;if(document.defaultView&&document.defaultView.getComputedStyle){getComputedStyle=function(elem,name){var ret,defaultView,computedStyle,width,style=elem.style;name=name.replace(rupper,"-$1").toLowerCase();if((defaultView=elem.ownerDocument.defaultView)&&(computedStyle=defaultView.getComputedStyle(elem,null))){ret=computedStyle.getPropertyValue(name);if(ret===""&&!OMjQuery.contains(elem.ownerDocument.documentElement,elem)){ret=OMjQuery.style(elem,name);}}
|
446
|
+
if(!OMjQuery.support.pixelMargin&&computedStyle&&rmargin.test(name)&&rnumnonpx.test(ret)){width=style.width;style.width=ret;ret=computedStyle.width;style.width=width;}
|
447
447
|
return ret;};}
|
448
448
|
if(document.documentElement.currentStyle){currentStyle=function(elem,name){var left,rsLeft,uncomputed,ret=elem.currentStyle&&elem.currentStyle[name],style=elem.style;if(ret==null&&style&&(uncomputed=style[name])){ret=uncomputed;}
|
449
449
|
if(rnumnonpx.test(ret)){left=style.left;rsLeft=elem.runtimeStyle&&elem.runtimeStyle.left;if(rsLeft){elem.runtimeStyle.left=elem.currentStyle.left;}
|
450
450
|
style.left=name==="fontSize"?"1em":ret;ret=style.pixelLeft+"px";style.left=left;if(rsLeft){elem.runtimeStyle.left=rsLeft;}}
|
451
451
|
return ret===""?"auto":ret;};}
|
452
|
-
curCSS=getComputedStyle||currentStyle;function getWidthOrHeight(elem,name,extra){var val=name==="width"?elem.offsetWidth:elem.offsetHeight,i=name==="width"?1:0,len=4;if(val>0){if(extra!=="border"){for(;i<len;i+=2){if(!extra){val-=parseFloat(
|
453
|
-
if(extra==="margin"){val+=parseFloat(
|
452
|
+
curCSS=getComputedStyle||currentStyle;function getWidthOrHeight(elem,name,extra){var val=name==="width"?elem.offsetWidth:elem.offsetHeight,i=name==="width"?1:0,len=4;if(val>0){if(extra!=="border"){for(;i<len;i+=2){if(!extra){val-=parseFloat(OMjQuery.css(elem,"padding"+cssExpand[i]))||0;}
|
453
|
+
if(extra==="margin"){val+=parseFloat(OMjQuery.css(elem,extra+cssExpand[i]))||0;}else{val-=parseFloat(OMjQuery.css(elem,"border"+cssExpand[i]+"Width"))||0;}}}
|
454
454
|
return val+"px";}
|
455
455
|
val=curCSS(elem,name);if(val<0||val==null){val=elem.style[name];}
|
456
456
|
if(rnumnonpx.test(val)){return val;}
|
457
|
-
val=parseFloat(val)||0;if(extra){for(;i<len;i+=2){val+=parseFloat(
|
458
|
-
if(extra==="margin"){val+=parseFloat(
|
457
|
+
val=parseFloat(val)||0;if(extra){for(;i<len;i+=2){val+=parseFloat(OMjQuery.css(elem,"padding"+cssExpand[i]))||0;if(extra!=="padding"){val+=parseFloat(OMjQuery.css(elem,"border"+cssExpand[i]+"Width"))||0;}
|
458
|
+
if(extra==="margin"){val+=parseFloat(OMjQuery.css(elem,extra+cssExpand[i]))||0;}}}
|
459
459
|
return val+"px";}
|
460
|
-
|
460
|
+
OMjQuery.each(["height","width"],function(i,name){OMjQuery.cssHooks[name]={get:function(elem,computed,extra){if(computed){if(elem.offsetWidth!==0){return getWidthOrHeight(elem,name,extra);}else{return OMjQuery.swap(elem,cssShow,function(){return getWidthOrHeight(elem,name,extra);});}}},set:function(elem,value){return rnum.test(value)?value+"px":value;}};});if(!OMjQuery.support.opacity){OMjQuery.cssHooks.opacity={get:function(elem,computed){return ropacity.test((computed&&elem.currentStyle?elem.currentStyle.filter:elem.style.filter)||"")?(parseFloat(RegExp.$1)/100)+"":computed?"1":"";},set:function(elem,value){var style=elem.style,currentStyle=elem.currentStyle,opacity=OMjQuery.isNumeric(value)?"alpha(opacity="+value*100+")":"",filter=currentStyle&¤tStyle.filter||style.filter||"";style.zoom=1;if(value>=1&&OMjQuery.trim(filter.replace(ralpha,""))===""){style.removeAttribute("filter");if(currentStyle&&!currentStyle.filter){return;}}
|
461
461
|
style.filter=ralpha.test(filter)?filter.replace(ralpha,opacity):filter+" "+opacity;}};}
|
462
|
-
|
463
|
-
|
464
|
-
return expanded;}};});var r20=/%20/g,rbracket=/\[\]$/,rCRLF=/\r?\n/g,rhash=/#.*$/,rheaders=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,rinput=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,rlocalProtocol=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,rnoContent=/^(?:GET|HEAD)$/,rprotocol=/^\/\//,rquery=/\?/,rscript=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,rselectTextarea=/^(?:select|textarea)/i,rspacesAjax=/\s+/,rts=/([?&])_=[^&]*/,rurl=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,_load=
|
462
|
+
OMjQuery(function(){if(!OMjQuery.support.reliableMarginRight){OMjQuery.cssHooks.marginRight={get:function(elem,computed){return OMjQuery.swap(elem,{"display":"inline-block"},function(){if(computed){return curCSS(elem,"margin-right");}else{return elem.style.marginRight;}});}};}});if(OMjQuery.expr&&OMjQuery.expr.filters){OMjQuery.expr.filters.hidden=function(elem){var width=elem.offsetWidth,height=elem.offsetHeight;return(width===0&&height===0)||(!OMjQuery.support.reliableHiddenOffsets&&((elem.style&&elem.style.display)||OMjQuery.css(elem,"display"))==="none");};OMjQuery.expr.filters.visible=function(elem){return!OMjQuery.expr.filters.hidden(elem);};}
|
463
|
+
OMjQuery.each({margin:"",padding:"",border:"Width"},function(prefix,suffix){OMjQuery.cssHooks[prefix+suffix]={expand:function(value){var i,parts=typeof value==="string"?value.split(" "):[value],expanded={};for(i=0;i<4;i++){expanded[prefix+cssExpand[i]+suffix]=parts[i]||parts[i-2]||parts[0];}
|
464
|
+
return expanded;}};});var r20=/%20/g,rbracket=/\[\]$/,rCRLF=/\r?\n/g,rhash=/#.*$/,rheaders=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,rinput=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,rlocalProtocol=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,rnoContent=/^(?:GET|HEAD)$/,rprotocol=/^\/\//,rquery=/\?/,rscript=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,rselectTextarea=/^(?:select|textarea)/i,rspacesAjax=/\s+/,rts=/([?&])_=[^&]*/,rurl=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,_load=OMjQuery.fn.load,prefilters={},transports={},ajaxLocation,ajaxLocParts,allTypes=["*/"]+["*"];try{ajaxLocation=location.href;}catch(e){ajaxLocation=document.createElement("a");ajaxLocation.href="";ajaxLocation=ajaxLocation.href;}
|
465
465
|
ajaxLocParts=rurl.exec(ajaxLocation.toLowerCase())||[];function addToPrefiltersOrTransports(structure){return function(dataTypeExpression,func){if(typeof dataTypeExpression!=="string"){func=dataTypeExpression;dataTypeExpression="*";}
|
466
|
-
if(
|
466
|
+
if(OMjQuery.isFunction(func)){var dataTypes=dataTypeExpression.toLowerCase().split(rspacesAjax),i=0,length=dataTypes.length,dataType,list,placeBefore;for(;i<length;i++){dataType=dataTypes[i];placeBefore=/^\+/.test(dataType);if(placeBefore){dataType=dataType.substr(1)||"*";}
|
467
467
|
list=structure[dataType]=structure[dataType]||[];list[placeBefore?"unshift":"push"](func);}}};}
|
468
468
|
function inspectPrefiltersOrTransports(structure,options,originalOptions,jqXHR,dataType,inspected){dataType=dataType||options.dataTypes[0];inspected=inspected||{};inspected[dataType]=true;var list=structure[dataType],i=0,length=list?list.length:0,executeOnly=(structure===prefilters),selection;for(;i<length&&(executeOnly||!selection);i++){selection=list[i](options,originalOptions,jqXHR);if(typeof selection==="string"){if(!executeOnly||inspected[selection]){selection=undefined;}else{options.dataTypes.unshift(selection);selection=inspectPrefiltersOrTransports(structure,options,originalOptions,jqXHR,selection,inspected);}}}
|
469
469
|
if((executeOnly||!selection)&&!inspected["*"]){selection=inspectPrefiltersOrTransports(structure,options,originalOptions,jqXHR,"*",inspected);}
|
470
470
|
return selection;}
|
471
|
-
function ajaxExtend(target,src){var key,deep,flatOptions=
|
472
|
-
if(deep){
|
473
|
-
|
471
|
+
function ajaxExtend(target,src){var key,deep,flatOptions=OMjQuery.ajaxSettings.flatOptions||{};for(key in src){if(src[key]!==undefined){(flatOptions[key]?target:(deep||(deep={})))[key]=src[key];}}
|
472
|
+
if(deep){OMjQuery.extend(true,target,deep);}}
|
473
|
+
OMjQuery.fn.extend({load:function(url,params,callback){if(typeof url!=="string"&&_load){return _load.apply(this,arguments);}else if(!this.length){return this;}
|
474
474
|
var off=url.indexOf(" ");if(off>=0){var selector=url.slice(off,url.length);url=url.slice(0,off);}
|
475
|
-
var type="GET";if(params){if(
|
476
|
-
var self=this;
|
477
|
-
if(callback){self.each(callback,[responseText,status,jqXHR]);}}});return this;},serialize:function(){return
|
478
|
-
return
|
479
|
-
ajaxExtend(target,settings);return target;},ajaxSettings:{url:ajaxLocation,isLocal:rlocalProtocol.test(ajaxLocParts[1]),global:true,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:true,async:true,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":allTypes},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":window.String,"text html":true,"text json":
|
475
|
+
var type="GET";if(params){if(OMjQuery.isFunction(params)){callback=params;params=undefined;}else if(typeof params==="object"){params=OMjQuery.param(params,OMjQuery.ajaxSettings.traditional);type="POST";}}
|
476
|
+
var self=this;OMjQuery.ajax({url:url,type:type,dataType:"html",data:params,complete:function(jqXHR,status,responseText){responseText=jqXHR.responseText;if(jqXHR.isResolved()){jqXHR.done(function(r){responseText=r;});self.html(selector?OMjQuery("<div>").append(responseText.replace(rscript,"")).find(selector):responseText);}
|
477
|
+
if(callback){self.each(callback,[responseText,status,jqXHR]);}}});return this;},serialize:function(){return OMjQuery.param(this.serializeArray());},serializeArray:function(){return this.map(function(){return this.elements?OMjQuery.makeArray(this.elements):this;}).filter(function(){return this.name&&!this.disabled&&(this.checked||rselectTextarea.test(this.nodeName)||rinput.test(this.type));}).map(function(i,elem){var val=OMjQuery(this).val();return val==null?null:OMjQuery.isArray(val)?OMjQuery.map(val,function(val,i){return{name:elem.name,value:val.replace(rCRLF,"\r\n")};}):{name:elem.name,value:val.replace(rCRLF,"\r\n")};}).get();}});OMjQuery.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(i,o){OMjQuery.fn[o]=function(f){return this.on(o,f);};});OMjQuery.each(["get","post"],function(i,method){OMjQuery[method]=function(url,data,callback,type){if(OMjQuery.isFunction(data)){type=type||callback;callback=data;data=undefined;}
|
478
|
+
return OMjQuery.ajax({type:method,url:url,data:data,success:callback,dataType:type});};});OMjQuery.extend({getScript:function(url,callback){return OMjQuery.get(url,undefined,callback,"script");},getJSON:function(url,data,callback){return OMjQuery.get(url,data,callback,"json");},ajaxSetup:function(target,settings){if(settings){ajaxExtend(target,OMjQuery.ajaxSettings);}else{settings=target;target=OMjQuery.ajaxSettings;}
|
479
|
+
ajaxExtend(target,settings);return target;},ajaxSettings:{url:ajaxLocation,isLocal:rlocalProtocol.test(ajaxLocParts[1]),global:true,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:true,async:true,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":allTypes},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":window.String,"text html":true,"text json":OMjQuery.parseJSON,"text xml":OMjQuery.parseXML},flatOptions:{context:true,url:true}},ajaxPrefilter:addToPrefiltersOrTransports(prefilters),ajaxTransport:addToPrefiltersOrTransports(transports),ajax:function(url,options){if(typeof url==="object"){options=url;url=undefined;}
|
480
480
|
options=options||{};var
|
481
|
-
s=
|
481
|
+
s=OMjQuery.ajaxSetup({},options),callbackContext=s.context||s,globalEventContext=callbackContext!==s&&(callbackContext.nodeType||callbackContext instanceof OMjQuery)?OMjQuery(callbackContext):OMjQuery.event,deferred=OMjQuery.Deferred(),completeDeferred=OMjQuery.Callbacks("once memory"),statusCode=s.statusCode||{},ifModifiedKey,requestHeaders={},requestHeadersNames={},responseHeadersString,responseHeaders,transport,timeoutTimer,parts,state=0,fireGlobals,i,jqXHR={readyState:0,setRequestHeader:function(name,value){if(!state){var lname=name.toLowerCase();name=requestHeadersNames[lname]=requestHeadersNames[lname]||name;requestHeaders[name]=value;}
|
482
482
|
return this;},getAllResponseHeaders:function(){return state===2?responseHeadersString:null;},getResponseHeader:function(key){var match;if(state===2){if(!responseHeaders){responseHeaders={};while((match=rheaders.exec(responseHeadersString))){responseHeaders[match[1].toLowerCase()]=match[2];}}
|
483
483
|
match=responseHeaders[key.toLowerCase()];}
|
484
484
|
return match===undefined?null:match;},overrideMimeType:function(type){if(!state){s.mimeType=type;}
|
485
485
|
return this;},abort:function(statusText){statusText=statusText||"abort";if(transport){transport.abort(statusText);}
|
486
486
|
done(0,statusText);return this;}};function done(status,nativeStatusText,responses,headers){if(state===2){return;}
|
487
487
|
state=2;if(timeoutTimer){clearTimeout(timeoutTimer);}
|
488
|
-
transport=undefined;responseHeadersString=headers||"";jqXHR.readyState=status>0?4:0;var isSuccess,success,error,statusText=nativeStatusText,response=responses?ajaxHandleResponses(s,jqXHR,responses):undefined,lastModified,etag;if(status>=200&&status<300||status===304){if(s.ifModified){if((lastModified=jqXHR.getResponseHeader("Last-Modified"))){
|
489
|
-
if((etag=jqXHR.getResponseHeader("Etag"))){
|
488
|
+
transport=undefined;responseHeadersString=headers||"";jqXHR.readyState=status>0?4:0;var isSuccess,success,error,statusText=nativeStatusText,response=responses?ajaxHandleResponses(s,jqXHR,responses):undefined,lastModified,etag;if(status>=200&&status<300||status===304){if(s.ifModified){if((lastModified=jqXHR.getResponseHeader("Last-Modified"))){OMjQuery.lastModified[ifModifiedKey]=lastModified;}
|
489
|
+
if((etag=jqXHR.getResponseHeader("Etag"))){OMjQuery.etag[ifModifiedKey]=etag;}}
|
490
490
|
if(status===304){statusText="notmodified";isSuccess=true;}else{try{success=ajaxConvert(s,response);statusText="success";isSuccess=true;}catch(e){statusText="parsererror";error=e;}}}else{error=statusText;if(!statusText||status){statusText="error";if(status<0){status=0;}}}
|
491
491
|
jqXHR.status=status;jqXHR.statusText=""+(nativeStatusText||statusText);if(isSuccess){deferred.resolveWith(callbackContext,[success,statusText,jqXHR]);}else{deferred.rejectWith(callbackContext,[jqXHR,statusText,error]);}
|
492
492
|
jqXHR.statusCode(statusCode);statusCode=undefined;if(fireGlobals){globalEventContext.trigger("ajax"+(isSuccess?"Success":"Error"),[jqXHR,s,isSuccess?success:error]);}
|
493
|
-
completeDeferred.fireWith(callbackContext,[jqXHR,statusText]);if(fireGlobals){globalEventContext.trigger("ajaxComplete",[jqXHR,s]);if(!(--
|
493
|
+
completeDeferred.fireWith(callbackContext,[jqXHR,statusText]);if(fireGlobals){globalEventContext.trigger("ajaxComplete",[jqXHR,s]);if(!(--OMjQuery.active)){OMjQuery.event.trigger("ajaxStop");}}}
|
494
494
|
deferred.promise(jqXHR);jqXHR.success=jqXHR.done;jqXHR.error=jqXHR.fail;jqXHR.complete=completeDeferred.add;jqXHR.statusCode=function(map){if(map){var tmp;if(state<2){for(tmp in map){statusCode[tmp]=[statusCode[tmp],map[tmp]];}}else{tmp=map[jqXHR.status];jqXHR.then(tmp,tmp);}}
|
495
|
-
return this;};s.url=((url||s.url)+"").replace(rhash,"").replace(rprotocol,ajaxLocParts[1]+"//");s.dataTypes=
|
496
|
-
if(s.data&&s.processData&&typeof s.data!=="string"){s.data=
|
495
|
+
return this;};s.url=((url||s.url)+"").replace(rhash,"").replace(rprotocol,ajaxLocParts[1]+"//");s.dataTypes=OMjQuery.trim(s.dataType||"*").toLowerCase().split(rspacesAjax);if(s.crossDomain==null){parts=rurl.exec(s.url.toLowerCase());s.crossDomain=!!(parts&&(parts[1]!=ajaxLocParts[1]||parts[2]!=ajaxLocParts[2]||(parts[3]||(parts[1]==="http:"?80:443))!=(ajaxLocParts[3]||(ajaxLocParts[1]==="http:"?80:443))));}
|
496
|
+
if(s.data&&s.processData&&typeof s.data!=="string"){s.data=OMjQuery.param(s.data,s.traditional);}
|
497
497
|
inspectPrefiltersOrTransports(prefilters,s,options,jqXHR);if(state===2){return false;}
|
498
|
-
fireGlobals=s.global;s.type=s.type.toUpperCase();s.hasContent=!rnoContent.test(s.type);if(fireGlobals&&
|
498
|
+
fireGlobals=s.global;s.type=s.type.toUpperCase();s.hasContent=!rnoContent.test(s.type);if(fireGlobals&&OMjQuery.active++===0){OMjQuery.event.trigger("ajaxStart");}
|
499
499
|
if(!s.hasContent){if(s.data){s.url+=(rquery.test(s.url)?"&":"?")+s.data;delete s.data;}
|
500
|
-
ifModifiedKey=s.url;if(s.cache===false){var ts=
|
500
|
+
ifModifiedKey=s.url;if(s.cache===false){var ts=OMjQuery.now(),ret=s.url.replace(rts,"$1_="+ts);s.url=ret+((ret===s.url)?(rquery.test(s.url)?"&":"?")+"_="+ts:"");}}
|
501
501
|
if(s.data&&s.hasContent&&s.contentType!==false||options.contentType){jqXHR.setRequestHeader("Content-Type",s.contentType);}
|
502
|
-
if(s.ifModified){ifModifiedKey=ifModifiedKey||s.url;if(
|
503
|
-
if(
|
502
|
+
if(s.ifModified){ifModifiedKey=ifModifiedKey||s.url;if(OMjQuery.lastModified[ifModifiedKey]){jqXHR.setRequestHeader("If-Modified-Since",OMjQuery.lastModified[ifModifiedKey]);}
|
503
|
+
if(OMjQuery.etag[ifModifiedKey]){jqXHR.setRequestHeader("If-None-Match",OMjQuery.etag[ifModifiedKey]);}}
|
504
504
|
jqXHR.setRequestHeader("Accept",s.dataTypes[0]&&s.accepts[s.dataTypes[0]]?s.accepts[s.dataTypes[0]]+(s.dataTypes[0]!=="*"?", "+allTypes+"; q=0.01":""):s.accepts["*"]);for(i in s.headers){jqXHR.setRequestHeader(i,s.headers[i]);}
|
505
505
|
if(s.beforeSend&&(s.beforeSend.call(callbackContext,jqXHR,s)===false||state===2)){jqXHR.abort();return false;}
|
506
506
|
for(i in{success:1,error:1,complete:1}){jqXHR[i](s[i]);}
|
507
507
|
transport=inspectPrefiltersOrTransports(transports,s,options,jqXHR);if(!transport){done(-1,"No Transport");}else{jqXHR.readyState=1;if(fireGlobals){globalEventContext.trigger("ajaxSend",[jqXHR,s]);}
|
508
508
|
if(s.async&&s.timeout>0){timeoutTimer=setTimeout(function(){jqXHR.abort("timeout");},s.timeout);}
|
509
509
|
try{state=1;transport.send(requestHeaders,done);}catch(e){if(state<2){done(-1,e);}else{throw e;}}}
|
510
|
-
return jqXHR;},param:function(a,traditional){var s=[],add=function(key,value){value=
|
511
|
-
if(
|
512
|
-
return s.join("&").replace(r20,"+");}});function buildParams(prefix,obj,traditional,add){if(
|
513
|
-
|
510
|
+
return jqXHR;},param:function(a,traditional){var s=[],add=function(key,value){value=OMjQuery.isFunction(value)?value():value;s[s.length]=encodeURIComponent(key)+"="+encodeURIComponent(value);};if(traditional===undefined){traditional=OMjQuery.ajaxSettings.traditional;}
|
511
|
+
if(OMjQuery.isArray(a)||(a.jquery&&!OMjQuery.isPlainObject(a))){OMjQuery.each(a,function(){add(this.name,this.value);});}else{for(var prefix in a){buildParams(prefix,a[prefix],traditional,add);}}
|
512
|
+
return s.join("&").replace(r20,"+");}});function buildParams(prefix,obj,traditional,add){if(OMjQuery.isArray(obj)){OMjQuery.each(obj,function(i,v){if(traditional||rbracket.test(prefix)){add(prefix,v);}else{buildParams(prefix+"["+(typeof v==="object"?i:"")+"]",v,traditional,add);}});}else if(!traditional&&OMjQuery.type(obj)==="object"){for(var name in obj){buildParams(prefix+"["+name+"]",obj[name],traditional,add);}}else{add(prefix,obj);}}
|
513
|
+
OMjQuery.extend({active:0,lastModified:{},etag:{}});function ajaxHandleResponses(s,jqXHR,responses){var contents=s.contents,dataTypes=s.dataTypes,responseFields=s.responseFields,ct,type,finalDataType,firstDataType;for(type in responseFields){if(type in responses){jqXHR[responseFields[type]]=responses[type];}}
|
514
514
|
while(dataTypes[0]==="*"){dataTypes.shift();if(ct===undefined){ct=s.mimeType||jqXHR.getResponseHeader("content-type");}}
|
515
515
|
if(ct){for(type in contents){if(contents[type]&&contents[type].test(ct)){dataTypes.unshift(type);break;}}}
|
516
516
|
if(dataTypes[0]in responses){finalDataType=dataTypes[0];}else{for(type in responses){if(!dataTypes[0]||s.converters[type+" "+dataTypes[0]]){finalDataType=type;break;}
|
@@ -522,107 +522,107 @@ function ajaxConvert(s,response){if(s.dataFilter){response=s.dataFilter(response
|
|
522
522
|
var dataTypes=s.dataTypes,converters={},i,key,length=dataTypes.length,tmp,current=dataTypes[0],prev,conversion,conv,conv1,conv2;for(i=1;i<length;i++){if(i===1){for(key in s.converters){if(typeof key==="string"){converters[key.toLowerCase()]=s.converters[key];}}}
|
523
523
|
prev=current;current=dataTypes[i];if(current==="*"){current=prev;}else if(prev!=="*"&&prev!==current){conversion=prev+" "+current;conv=converters[conversion]||converters["* "+current];if(!conv){conv2=undefined;for(conv1 in converters){tmp=conv1.split(" ");if(tmp[0]===prev||tmp[0]==="*"){conv2=converters[tmp[1]+" "+current];if(conv2){conv1=converters[conv1];if(conv1===true){conv=conv2;}else if(conv2===true){conv=conv1;}
|
524
524
|
break;}}}}
|
525
|
-
if(!(conv||conv2)){
|
525
|
+
if(!(conv||conv2)){OMjQuery.error("No conversion from "+conversion.replace(" "," to "));}
|
526
526
|
if(conv!==true){response=conv?conv(response):conv2(conv1(response));}}}
|
527
527
|
return response;}
|
528
|
-
var jsc=
|
528
|
+
var jsc=OMjQuery.now(),jsre=/(\=)\?(&|$)|\?\?/i;OMjQuery.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return OMjQuery.expando+"_"+(jsc++);}});OMjQuery.ajaxPrefilter("json jsonp",function(s,originalSettings,jqXHR){var inspectData=(typeof s.data==="string")&&/^application\/x\-www\-form\-urlencoded/.test(s.contentType);if(s.dataTypes[0]==="jsonp"||s.jsonp!==false&&(jsre.test(s.url)||inspectData&&jsre.test(s.data))){var responseContainer,jsonpCallback=s.jsonpCallback=OMjQuery.isFunction(s.jsonpCallback)?s.jsonpCallback():s.jsonpCallback,previous=window[jsonpCallback],url=s.url,data=s.data,replace="$1"+jsonpCallback+"$2";if(s.jsonp!==false){url=url.replace(jsre,replace);if(s.url===url){if(inspectData){data=data.replace(jsre,replace);}
|
529
529
|
if(s.data===data){url+=(/\?/.test(url)?"&":"?")+s.jsonp+"="+jsonpCallback;}}}
|
530
|
-
s.url=url;s.data=data;window[jsonpCallback]=function(response){responseContainer=[response];};jqXHR.always(function(){window[jsonpCallback]=previous;if(responseContainer&&
|
531
|
-
return responseContainer[0];};s.dataTypes[0]="json";return"script";}});
|
532
|
-
if(s.crossDomain){s.type="GET";s.global=false;}});
|
530
|
+
s.url=url;s.data=data;window[jsonpCallback]=function(response){responseContainer=[response];};jqXHR.always(function(){window[jsonpCallback]=previous;if(responseContainer&&OMjQuery.isFunction(previous)){window[jsonpCallback](responseContainer[0]);}});s.converters["script json"]=function(){if(!responseContainer){OMjQuery.error(jsonpCallback+" was not called");}
|
531
|
+
return responseContainer[0];};s.dataTypes[0]="json";return"script";}});OMjQuery.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(text){OMjQuery.globalEval(text);return text;}}});OMjQuery.ajaxPrefilter("script",function(s){if(s.cache===undefined){s.cache=false;}
|
532
|
+
if(s.crossDomain){s.type="GET";s.global=false;}});OMjQuery.ajaxTransport("script",function(s){if(s.crossDomain){var script,head=document.head||document.getElementsByTagName("head")[0]||document.documentElement;return{send:function(_,callback){script=document.createElement("script");script.async="async";if(s.scriptCharset){script.charset=s.scriptCharset;}
|
533
533
|
script.src=s.url;script.onload=script.onreadystatechange=function(_,isAbort){if(isAbort||!script.readyState||/loaded|complete/.test(script.readyState)){script.onload=script.onreadystatechange=null;if(head&&script.parentNode){head.removeChild(script);}
|
534
534
|
script=undefined;if(!isAbort){callback(200,"success");}}};head.insertBefore(script,head.firstChild);},abort:function(){if(script){script.onload(0,1);}}};}});var
|
535
535
|
xhrOnUnloadAbort=window.ActiveXObject?function(){for(var key in xhrCallbacks){xhrCallbacks[key](0,1);}}:false,xhrId=0,xhrCallbacks;function createStandardXHR(){try{return new window.XMLHttpRequest();}catch(e){}}
|
536
536
|
function createActiveXHR(){try{return new window.ActiveXObject("Microsoft.XMLHTTP");}catch(e){}}
|
537
|
-
|
537
|
+
OMjQuery.ajaxSettings.xhr=window.ActiveXObject?function(){return!this.isLocal&&createStandardXHR()||createActiveXHR();}:createStandardXHR;(function(xhr){OMjQuery.extend(OMjQuery.support,{ajax:!!xhr,cors:!!xhr&&("withCredentials"in xhr)});})(OMjQuery.ajaxSettings.xhr());if(OMjQuery.support.ajax){OMjQuery.ajaxTransport(function(s){if(!s.crossDomain||OMjQuery.support.cors){var callback;return{send:function(headers,complete){var xhr=s.xhr(),handle,i;if(s.username){xhr.open(s.type,s.url,s.async,s.username,s.password);}else{xhr.open(s.type,s.url,s.async);}
|
538
538
|
if(s.xhrFields){for(i in s.xhrFields){xhr[i]=s.xhrFields[i];}}
|
539
539
|
if(s.mimeType&&xhr.overrideMimeType){xhr.overrideMimeType(s.mimeType);}
|
540
540
|
if(!s.crossDomain&&!headers["X-Requested-With"]){headers["X-Requested-With"]="XMLHttpRequest";}
|
541
541
|
try{for(i in headers){xhr.setRequestHeader(i,headers[i]);}}catch(_){}
|
542
|
-
xhr.send((s.hasContent&&s.data)||null);callback=function(_,isAbort){var status,statusText,responseHeaders,responses,xml;try{if(callback&&(isAbort||xhr.readyState===4)){callback=undefined;if(handle){xhr.onreadystatechange=
|
542
|
+
xhr.send((s.hasContent&&s.data)||null);callback=function(_,isAbort){var status,statusText,responseHeaders,responses,xml;try{if(callback&&(isAbort||xhr.readyState===4)){callback=undefined;if(handle){xhr.onreadystatechange=OMjQuery.noop;if(xhrOnUnloadAbort){delete xhrCallbacks[handle];}}
|
543
543
|
if(isAbort){if(xhr.readyState!==4){xhr.abort();}}else{status=xhr.status;responseHeaders=xhr.getAllResponseHeaders();responses={};xml=xhr.responseXML;if(xml&&xml.documentElement){responses.xml=xml;}
|
544
544
|
try{responses.text=xhr.responseText;}catch(_){}
|
545
545
|
try{statusText=xhr.statusText;}catch(e){statusText="";}
|
546
546
|
if(!status&&s.isLocal&&!s.crossDomain){status=responses.text?200:404;}else if(status===1223){status=204;}}}}catch(firefoxAccessException){if(!isAbort){complete(-1,firefoxAccessException);}}
|
547
|
-
if(responses){complete(status,statusText,responses,responseHeaders);}};if(!s.async||xhr.readyState===4){callback();}else{handle=++xhrId;if(xhrOnUnloadAbort){if(!xhrCallbacks){xhrCallbacks={};
|
547
|
+
if(responses){complete(status,statusText,responses,responseHeaders);}};if(!s.async||xhr.readyState===4){callback();}else{handle=++xhrId;if(xhrOnUnloadAbort){if(!xhrCallbacks){xhrCallbacks={};OMjQuery(window).unload(xhrOnUnloadAbort);}
|
548
548
|
xhrCallbacks[handle]=callback;}
|
549
549
|
xhr.onreadystatechange=callback;}},abort:function(){if(callback){callback(0,1);}}};}});}
|
550
|
-
var elemdisplay={},iframe,iframeDoc,rfxtypes=/^(?:toggle|show|hide)$/,rfxnum=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,timerId,fxAttrs=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],fxNow;
|
551
|
-
if((display===""&&
|
552
|
-
for(i=0;i<j;i++){elem=this[i];if(elem.style){display=elem.style.display;if(display===""||display==="none"){elem.style.display=
|
553
|
-
return this;}},hide:function(speed,easing,callback){if(speed||speed===0){return this.animate(genFx("hide",3),speed,easing,callback);}else{var elem,display,i=0,j=this.length;for(;i<j;i++){elem=this[i];if(elem.style){display=
|
550
|
+
var elemdisplay={},iframe,iframeDoc,rfxtypes=/^(?:toggle|show|hide)$/,rfxnum=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,timerId,fxAttrs=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],fxNow;OMjQuery.fn.extend({show:function(speed,easing,callback){var elem,display;if(speed||speed===0){return this.animate(genFx("show",3),speed,easing,callback);}else{for(var i=0,j=this.length;i<j;i++){elem=this[i];if(elem.style){display=elem.style.display;if(!OMjQuery._data(elem,"olddisplay")&&display==="none"){display=elem.style.display="";}
|
551
|
+
if((display===""&&OMjQuery.css(elem,"display")==="none")||!OMjQuery.contains(elem.ownerDocument.documentElement,elem)){OMjQuery._data(elem,"olddisplay",defaultDisplay(elem.nodeName));}}}
|
552
|
+
for(i=0;i<j;i++){elem=this[i];if(elem.style){display=elem.style.display;if(display===""||display==="none"){elem.style.display=OMjQuery._data(elem,"olddisplay")||"";}}}
|
553
|
+
return this;}},hide:function(speed,easing,callback){if(speed||speed===0){return this.animate(genFx("hide",3),speed,easing,callback);}else{var elem,display,i=0,j=this.length;for(;i<j;i++){elem=this[i];if(elem.style){display=OMjQuery.css(elem,"display");if(display!=="none"&&!OMjQuery._data(elem,"olddisplay")){OMjQuery._data(elem,"olddisplay",display);}}}
|
554
554
|
for(i=0;i<j;i++){if(this[i].style){this[i].style.display="none";}}
|
555
|
-
return this;}},_toggle:
|
556
|
-
return this;},fadeTo:function(speed,to,easing,callback){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:to},speed,easing,callback);},animate:function(prop,speed,easing,callback){var optall=
|
557
|
-
prop=
|
558
|
-
var opt=
|
559
|
-
if((hooks=
|
560
|
-
for(name in prop){val=prop[name];if(
|
555
|
+
return this;}},_toggle:OMjQuery.fn.toggle,toggle:function(fn,fn2,callback){var bool=typeof fn==="boolean";if(OMjQuery.isFunction(fn)&&OMjQuery.isFunction(fn2)){this._toggle.apply(this,arguments);}else if(fn==null||bool){this.each(function(){var state=bool?fn:OMjQuery(this).is(":hidden");OMjQuery(this)[state?"show":"hide"]();});}else{this.animate(genFx("toggle",3),fn,fn2,callback);}
|
556
|
+
return this;},fadeTo:function(speed,to,easing,callback){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:to},speed,easing,callback);},animate:function(prop,speed,easing,callback){var optall=OMjQuery.speed(speed,easing,callback);if(OMjQuery.isEmptyObject(prop)){return this.each(optall.complete,[false]);}
|
557
|
+
prop=OMjQuery.extend({},prop);function doAnimation(){if(optall.queue===false){OMjQuery._mark(this);}
|
558
|
+
var opt=OMjQuery.extend({},optall),isElement=this.nodeType===1,hidden=isElement&&OMjQuery(this).is(":hidden"),name,val,p,e,hooks,replace,parts,start,end,unit,method;opt.animatedProperties={};for(p in prop){name=OMjQuery.camelCase(p);if(p!==name){prop[name]=prop[p];delete prop[p];}
|
559
|
+
if((hooks=OMjQuery.cssHooks[name])&&"expand"in hooks){replace=hooks.expand(prop[name]);delete prop[name];for(p in replace){if(!(p in prop)){prop[p]=replace[p];}}}}
|
560
|
+
for(name in prop){val=prop[name];if(OMjQuery.isArray(val)){opt.animatedProperties[name]=val[1];val=prop[name]=val[0];}else{opt.animatedProperties[name]=opt.specialEasing&&opt.specialEasing[name]||opt.easing||'swing';}
|
561
561
|
if(val==="hide"&&hidden||val==="show"&&!hidden){return opt.complete.call(this);}
|
562
|
-
if(isElement&&(name==="height"||name==="width")){opt.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY];if(
|
562
|
+
if(isElement&&(name==="height"||name==="width")){opt.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY];if(OMjQuery.css(this,"display")==="inline"&&OMjQuery.css(this,"float")==="none"){if(!OMjQuery.support.inlineBlockNeedsLayout||defaultDisplay(this.nodeName)==="inline"){this.style.display="inline-block";}else{this.style.zoom=1;}}}}
|
563
563
|
if(opt.overflow!=null){this.style.overflow="hidden";}
|
564
|
-
for(p in prop){e=new
|
564
|
+
for(p in prop){e=new OMjQuery.fx(this,opt,p);val=prop[p];if(rfxtypes.test(val)){method=OMjQuery._data(this,"toggle"+p)||(val==="toggle"?hidden?"show":"hide":0);if(method){OMjQuery._data(this,"toggle"+p,method==="show"?"hide":"show");e[method]();}else{e[val]();}}else{parts=rfxnum.exec(val);start=e.cur();if(parts){end=parseFloat(parts[2]);unit=parts[3]||(OMjQuery.cssNumber[p]?"":"px");if(unit!=="px"){OMjQuery.style(this,p,(end||1)+unit);start=((end||1)/e.cur())*start;OMjQuery.style(this,p,start+unit);}
|
565
565
|
if(parts[1]){end=((parts[1]==="-="?-1:1)*end)+start;}
|
566
566
|
e.custom(start,end,unit);}else{e.custom(start,val,"");}}}
|
567
567
|
return true;}
|
568
568
|
return optall.queue===false?this.each(doAnimation):this.queue(optall.queue,doAnimation);},stop:function(type,clearQueue,gotoEnd){if(typeof type!=="string"){gotoEnd=clearQueue;clearQueue=type;type=undefined;}
|
569
569
|
if(clearQueue&&type!==false){this.queue(type||"fx",[]);}
|
570
|
-
return this.each(function(){var index,hadTimers=false,timers=
|
571
|
-
function stopQueue(elem,data,index){var hooks=data[index];
|
570
|
+
return this.each(function(){var index,hadTimers=false,timers=OMjQuery.timers,data=OMjQuery._data(this);if(!gotoEnd){OMjQuery._unmark(true,this);}
|
571
|
+
function stopQueue(elem,data,index){var hooks=data[index];OMjQuery.removeData(elem,index,true);hooks.stop(gotoEnd);}
|
572
572
|
if(type==null){for(index in data){if(data[index]&&data[index].stop&&index.indexOf(".run")===index.length-4){stopQueue(this,data,index);}}}else if(data[index=type+".run"]&&data[index].stop){stopQueue(this,data,index);}
|
573
573
|
for(index=timers.length;index--;){if(timers[index].elem===this&&(type==null||timers[index].queue===type)){if(gotoEnd){timers[index](true);}else{timers[index].saveState();}
|
574
574
|
hadTimers=true;timers.splice(index,1);}}
|
575
|
-
if(!(gotoEnd&&hadTimers)){
|
575
|
+
if(!(gotoEnd&&hadTimers)){OMjQuery.dequeue(this,type);}});}});function createFxNow(){setTimeout(clearFxNow,0);return(fxNow=OMjQuery.now());}
|
576
576
|
function clearFxNow(){fxNow=undefined;}
|
577
|
-
function genFx(type,num){var obj={};
|
578
|
-
|
579
|
-
opt.old=opt.complete;opt.complete=function(noUnmark){if(
|
580
|
-
if(opt.queue){
|
581
|
-
(
|
582
|
-
var parsed,r=
|
583
|
-
t.queue=this.options.queue;t.elem=this.elem;t.saveState=function(){if(
|
584
|
-
|
585
|
-
if(done){if(options.overflow!=null&&!
|
586
|
-
if(options.hide){
|
587
|
-
if(options.hide||options.show){for(p in options.animatedProperties){
|
577
|
+
function genFx(type,num){var obj={};OMjQuery.each(fxAttrs.concat.apply([],fxAttrs.slice(0,num)),function(){obj[this]=type;});return obj;}
|
578
|
+
OMjQuery.each({slideDown:genFx("show",1),slideUp:genFx("hide",1),slideToggle:genFx("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(name,props){OMjQuery.fn[name]=function(speed,easing,callback){return this.animate(props,speed,easing,callback);};});OMjQuery.extend({speed:function(speed,easing,fn){var opt=speed&&typeof speed==="object"?OMjQuery.extend({},speed):{complete:fn||!fn&&easing||OMjQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&!OMjQuery.isFunction(easing)&&easing};opt.duration=OMjQuery.fx.off?0:typeof opt.duration==="number"?opt.duration:opt.duration in OMjQuery.fx.speeds?OMjQuery.fx.speeds[opt.duration]:OMjQuery.fx.speeds._default;if(opt.queue==null||opt.queue===true){opt.queue="fx";}
|
579
|
+
opt.old=opt.complete;opt.complete=function(noUnmark){if(OMjQuery.isFunction(opt.old)){opt.old.call(this);}
|
580
|
+
if(opt.queue){OMjQuery.dequeue(this,opt.queue);}else if(noUnmark!==false){OMjQuery._unmark(this);}};return opt;},easing:{linear:function(p){return p;},swing:function(p){return(-Math.cos(p*Math.PI)/2)+0.5;}},timers:[],fx:function(elem,options,prop){this.options=options;this.elem=elem;this.prop=prop;options.orig=options.orig||{};}});OMjQuery.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this);}
|
581
|
+
(OMjQuery.fx.step[this.prop]||OMjQuery.fx.step._default)(this);},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop];}
|
582
|
+
var parsed,r=OMjQuery.css(this.elem,this.prop);return isNaN(parsed=parseFloat(r))?!r||r==="auto"?0:r:parsed;},custom:function(from,to,unit){var self=this,fx=OMjQuery.fx;this.startTime=fxNow||createFxNow();this.end=to;this.now=this.start=from;this.pos=this.state=0;this.unit=unit||this.unit||(OMjQuery.cssNumber[this.prop]?"":"px");function t(gotoEnd){return self.step(gotoEnd);}
|
583
|
+
t.queue=this.options.queue;t.elem=this.elem;t.saveState=function(){if(OMjQuery._data(self.elem,"fxshow"+self.prop)===undefined){if(self.options.hide){OMjQuery._data(self.elem,"fxshow"+self.prop,self.start);}else if(self.options.show){OMjQuery._data(self.elem,"fxshow"+self.prop,self.end);}}};if(t()&&OMjQuery.timers.push(t)&&!timerId){timerId=setInterval(fx.tick,fx.interval);}},show:function(){var dataShow=OMjQuery._data(this.elem,"fxshow"+this.prop);this.options.orig[this.prop]=dataShow||OMjQuery.style(this.elem,this.prop);this.options.show=true;if(dataShow!==undefined){this.custom(this.cur(),dataShow);}else{this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());}
|
584
|
+
OMjQuery(this.elem).show();},hide:function(){this.options.orig[this.prop]=OMjQuery._data(this.elem,"fxshow"+this.prop)||OMjQuery.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0);},step:function(gotoEnd){var p,n,complete,t=fxNow||createFxNow(),done=true,elem=this.elem,options=this.options;if(gotoEnd||t>=options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();options.animatedProperties[this.prop]=true;for(p in options.animatedProperties){if(options.animatedProperties[p]!==true){done=false;}}
|
585
|
+
if(done){if(options.overflow!=null&&!OMjQuery.support.shrinkWrapBlocks){OMjQuery.each(["","X","Y"],function(index,value){elem.style["overflow"+value]=options.overflow[index];});}
|
586
|
+
if(options.hide){OMjQuery(elem).hide();}
|
587
|
+
if(options.hide||options.show){for(p in options.animatedProperties){OMjQuery.style(elem,p,options.orig[p]);OMjQuery.removeData(elem,"fxshow"+p,true);OMjQuery.removeData(elem,"toggle"+p,true);}}
|
588
588
|
complete=options.complete;if(complete){options.complete=false;complete.call(elem);}}
|
589
|
-
return false;}else{if(options.duration==Infinity){this.now=t;}else{n=t-this.startTime;this.state=n/options.duration;this.pos=
|
589
|
+
return false;}else{if(options.duration==Infinity){this.now=t;}else{n=t-this.startTime;this.state=n/options.duration;this.pos=OMjQuery.easing[options.animatedProperties[this.prop]](this.state,n,0,1,options.duration);this.now=this.start+((this.end-this.start)*this.pos);}
|
590
590
|
this.update();}
|
591
|
-
return true;}};
|
592
|
-
if(!timers.length){
|
593
|
-
function defaultDisplay(nodeName){if(!elemdisplay[nodeName]){var body=document.body,elem=
|
594
|
-
body.appendChild(iframe);if(!iframeDoc||!iframe.createElement){iframeDoc=(iframe.contentWindow||iframe.contentDocument).document;iframeDoc.write((
|
595
|
-
elem=iframeDoc.createElement(nodeName);iframeDoc.body.appendChild(elem);display=
|
591
|
+
return true;}};OMjQuery.extend(OMjQuery.fx,{tick:function(){var timer,timers=OMjQuery.timers,i=0;for(;i<timers.length;i++){timer=timers[i];if(!timer()&&timers[i]===timer){timers.splice(i--,1);}}
|
592
|
+
if(!timers.length){OMjQuery.fx.stop();}},interval:13,stop:function(){clearInterval(timerId);timerId=null;},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(fx){OMjQuery.style(fx.elem,"opacity",fx.now);},_default:function(fx){if(fx.elem.style&&fx.elem.style[fx.prop]!=null){fx.elem.style[fx.prop]=fx.now+fx.unit;}else{fx.elem[fx.prop]=fx.now;}}}});OMjQuery.each(fxAttrs.concat.apply([],fxAttrs),function(i,prop){if(prop.indexOf("margin")){OMjQuery.fx.step[prop]=function(fx){OMjQuery.style(fx.elem,prop,Math.max(0,fx.now)+fx.unit);};}});if(OMjQuery.expr&&OMjQuery.expr.filters){OMjQuery.expr.filters.animated=function(elem){return OMjQuery.grep(OMjQuery.timers,function(fn){return elem===fn.elem;}).length;};}
|
593
|
+
function defaultDisplay(nodeName){if(!elemdisplay[nodeName]){var body=document.body,elem=OMjQuery("<"+nodeName+">").appendTo(body),display=elem.css("display");elem.remove();if(display==="none"||display===""){if(!iframe){iframe=document.createElement("iframe");iframe.frameBorder=iframe.width=iframe.height=0;}
|
594
|
+
body.appendChild(iframe);if(!iframeDoc||!iframe.createElement){iframeDoc=(iframe.contentWindow||iframe.contentDocument).document;iframeDoc.write((OMjQuery.support.boxModel?"<!doctype html>":"")+"<html><body>");iframeDoc.close();}
|
595
|
+
elem=iframeDoc.createElement(nodeName);iframeDoc.body.appendChild(elem);display=OMjQuery.css(elem,"display");body.removeChild(iframe);}
|
596
596
|
elemdisplay[nodeName]=display;}
|
597
597
|
return elemdisplay[nodeName];}
|
598
598
|
var getOffset,rtable=/^t(?:able|d|h)$/i,rroot=/^(?:body|html)$/i;if("getBoundingClientRect"in document.documentElement){getOffset=function(elem,doc,docElem,box){try{box=elem.getBoundingClientRect();}catch(e){}
|
599
|
-
if(!box||!
|
600
|
-
var body=doc.body,win=getWindow(doc),clientTop=docElem.clientTop||body.clientTop||0,clientLeft=docElem.clientLeft||body.clientLeft||0,scrollTop=win.pageYOffset||
|
601
|
-
computedStyle=defaultView?defaultView.getComputedStyle(elem,null):elem.currentStyle;top-=elem.scrollTop;left-=elem.scrollLeft;if(elem===offsetParent){top+=elem.offsetTop;left+=elem.offsetLeft;if(
|
599
|
+
if(!box||!OMjQuery.contains(docElem,elem)){return box?{top:box.top,left:box.left}:{top:0,left:0};}
|
600
|
+
var body=doc.body,win=getWindow(doc),clientTop=docElem.clientTop||body.clientTop||0,clientLeft=docElem.clientLeft||body.clientLeft||0,scrollTop=win.pageYOffset||OMjQuery.support.boxModel&&docElem.scrollTop||body.scrollTop,scrollLeft=win.pageXOffset||OMjQuery.support.boxModel&&docElem.scrollLeft||body.scrollLeft,top=box.top+scrollTop-clientTop,left=box.left+scrollLeft-clientLeft;return{top:top,left:left};};}else{getOffset=function(elem,doc,docElem){var computedStyle,offsetParent=elem.offsetParent,prevOffsetParent=elem,body=doc.body,defaultView=doc.defaultView,prevComputedStyle=defaultView?defaultView.getComputedStyle(elem,null):elem.currentStyle,top=elem.offsetTop,left=elem.offsetLeft;while((elem=elem.parentNode)&&elem!==body&&elem!==docElem){if(OMjQuery.support.fixedPosition&&prevComputedStyle.position==="fixed"){break;}
|
601
|
+
computedStyle=defaultView?defaultView.getComputedStyle(elem,null):elem.currentStyle;top-=elem.scrollTop;left-=elem.scrollLeft;if(elem===offsetParent){top+=elem.offsetTop;left+=elem.offsetLeft;if(OMjQuery.support.doesNotAddBorder&&!(OMjQuery.support.doesAddBorderForTableAndCells&&rtable.test(elem.nodeName))){top+=parseFloat(computedStyle.borderTopWidth)||0;left+=parseFloat(computedStyle.borderLeftWidth)||0;}
|
602
602
|
prevOffsetParent=offsetParent;offsetParent=elem.offsetParent;}
|
603
|
-
if(
|
603
|
+
if(OMjQuery.support.subtractsBorderForOverflowNotVisible&&computedStyle.overflow!=="visible"){top+=parseFloat(computedStyle.borderTopWidth)||0;left+=parseFloat(computedStyle.borderLeftWidth)||0;}
|
604
604
|
prevComputedStyle=computedStyle;}
|
605
605
|
if(prevComputedStyle.position==="relative"||prevComputedStyle.position==="static"){top+=body.offsetTop;left+=body.offsetLeft;}
|
606
|
-
if(
|
606
|
+
if(OMjQuery.support.fixedPosition&&prevComputedStyle.position==="fixed"){top+=Math.max(docElem.scrollTop,body.scrollTop);left+=Math.max(docElem.scrollLeft,body.scrollLeft);}
|
607
607
|
return{top:top,left:left};};}
|
608
|
-
|
608
|
+
OMjQuery.fn.offset=function(options){if(arguments.length){return options===undefined?this:this.each(function(i){OMjQuery.offset.setOffset(this,options,i);});}
|
609
609
|
var elem=this[0],doc=elem&&elem.ownerDocument;if(!doc){return null;}
|
610
|
-
if(elem===doc.body){return
|
611
|
-
return getOffset(elem,doc,doc.documentElement);};
|
612
|
-
return{top:top,left:left};},setOffset:function(elem,options,i){var position=
|
613
|
-
var curElem=
|
614
|
-
if(
|
610
|
+
if(elem===doc.body){return OMjQuery.offset.bodyOffset(elem);}
|
611
|
+
return getOffset(elem,doc,doc.documentElement);};OMjQuery.offset={bodyOffset:function(body){var top=body.offsetTop,left=body.offsetLeft;if(OMjQuery.support.doesNotIncludeMarginInBodyOffset){top+=parseFloat(OMjQuery.css(body,"marginTop"))||0;left+=parseFloat(OMjQuery.css(body,"marginLeft"))||0;}
|
612
|
+
return{top:top,left:left};},setOffset:function(elem,options,i){var position=OMjQuery.css(elem,"position");if(position==="static"){elem.style.position="relative";}
|
613
|
+
var curElem=OMjQuery(elem),curOffset=curElem.offset(),curCSSTop=OMjQuery.css(elem,"top"),curCSSLeft=OMjQuery.css(elem,"left"),calculatePosition=(position==="absolute"||position==="fixed")&&OMjQuery.inArray("auto",[curCSSTop,curCSSLeft])>-1,props={},curPosition={},curTop,curLeft;if(calculatePosition){curPosition=curElem.position();curTop=curPosition.top;curLeft=curPosition.left;}else{curTop=parseFloat(curCSSTop)||0;curLeft=parseFloat(curCSSLeft)||0;}
|
614
|
+
if(OMjQuery.isFunction(options)){options=options.call(elem,i,curOffset);}
|
615
615
|
if(options.top!=null){props.top=(options.top-curOffset.top)+curTop;}
|
616
616
|
if(options.left!=null){props.left=(options.left-curOffset.left)+curLeft;}
|
617
|
-
if("using"in options){options.using.call(elem,props);}else{curElem.css(props);}}};
|
618
|
-
var elem=this[0],offsetParent=this.offsetParent(),offset=this.offset(),parentOffset=rroot.test(offsetParent[0].nodeName)?{top:0,left:0}:offsetParent.offset();offset.top-=parseFloat(
|
619
|
-
return offsetParent;});}});
|
620
|
-
if(win){win.scrollTo(!top?val:
|
621
|
-
|
617
|
+
if("using"in options){options.using.call(elem,props);}else{curElem.css(props);}}};OMjQuery.fn.extend({position:function(){if(!this[0]){return null;}
|
618
|
+
var elem=this[0],offsetParent=this.offsetParent(),offset=this.offset(),parentOffset=rroot.test(offsetParent[0].nodeName)?{top:0,left:0}:offsetParent.offset();offset.top-=parseFloat(OMjQuery.css(elem,"marginTop"))||0;offset.left-=parseFloat(OMjQuery.css(elem,"marginLeft"))||0;parentOffset.top+=parseFloat(OMjQuery.css(offsetParent[0],"borderTopWidth"))||0;parentOffset.left+=parseFloat(OMjQuery.css(offsetParent[0],"borderLeftWidth"))||0;return{top:offset.top-parentOffset.top,left:offset.left-parentOffset.left};},offsetParent:function(){return this.map(function(){var offsetParent=this.offsetParent||document.body;while(offsetParent&&(!rroot.test(offsetParent.nodeName)&&OMjQuery.css(offsetParent,"position")==="static")){offsetParent=offsetParent.offsetParent;}
|
619
|
+
return offsetParent;});}});OMjQuery.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(method,prop){var top=/Y/.test(prop);OMjQuery.fn[method]=function(val){return OMjQuery.access(this,function(elem,method,val){var win=getWindow(elem);if(val===undefined){return win?(prop in win)?win[prop]:OMjQuery.support.boxModel&&win.document.documentElement[method]||win.document.body[method]:elem[method];}
|
620
|
+
if(win){win.scrollTo(!top?val:OMjQuery(win).scrollLeft(),top?val:OMjQuery(win).scrollTop());}else{elem[method]=val;}},method,val,arguments.length,null);};});function getWindow(elem){return OMjQuery.isWindow(elem)?elem:elem.nodeType===9?elem.defaultView||elem.parentWindow:false;}
|
621
|
+
OMjQuery.each({Height:"height",Width:"width"},function(name,type){var clientProp="client"+name,scrollProp="scroll"+name,offsetProp="offset"+name;OMjQuery.fn["inner"+name]=function(){var elem=this[0];return elem?elem.style?parseFloat(OMjQuery.css(elem,type,"padding")):this[type]():null;};OMjQuery.fn["outer"+name]=function(margin){var elem=this[0];return elem?elem.style?parseFloat(OMjQuery.css(elem,type,margin?"margin":"border")):this[type]():null;};OMjQuery.fn[type]=function(value){return OMjQuery.access(this,function(elem,type,value){var doc,docElemProp,orig,ret;if(OMjQuery.isWindow(elem)){doc=elem.document;docElemProp=doc.documentElement[clientProp];return OMjQuery.support.boxModel&&docElemProp||doc.body&&doc.body[clientProp]||docElemProp;}
|
622
622
|
if(elem.nodeType===9){doc=elem.documentElement;if(doc[clientProp]>=doc[scrollProp]){return doc[clientProp];}
|
623
623
|
return Math.max(elem.body[scrollProp],doc[scrollProp],elem.body[offsetProp],doc[offsetProp]);}
|
624
|
-
if(value===undefined){orig=
|
625
|
-
|
624
|
+
if(value===undefined){orig=OMjQuery.css(elem,type);ret=parseFloat(orig);return OMjQuery.isNumeric(ret)?ret:orig;}
|
625
|
+
OMjQuery(elem).css(type,value);},type,value,arguments.length,null);};});window.OMjQuery=window.$o=OMjQuery;if(typeof define==="function"&&define.amd&&define.amd.OMjQuery){define("jquery",[],function(){return OMjQuery;});}})(window);(function(){var root=this;var previousUnderscore=root._;var breaker={};var ArrayProto=Array.prototype,ObjProto=Object.prototype,FuncProto=Function.prototype;var slice=ArrayProto.slice,unshift=ArrayProto.unshift,toString=ObjProto.toString,hasOwnProperty=ObjProto.hasOwnProperty;var
|
626
626
|
nativeForEach=ArrayProto.forEach,nativeMap=ArrayProto.map,nativeReduce=ArrayProto.reduce,nativeReduceRight=ArrayProto.reduceRight,nativeFilter=ArrayProto.filter,nativeEvery=ArrayProto.every,nativeSome=ArrayProto.some,nativeIndexOf=ArrayProto.indexOf,nativeLastIndexOf=ArrayProto.lastIndexOf,nativeIsArray=Array.isArray,nativeKeys=Object.keys,nativeBind=FuncProto.bind;var _=function(obj){return new wrapper(obj);};if(typeof module!=='undefined'&&module.exports){module.exports=_;_._=_;}else{root._=_;}
|
627
627
|
_.VERSION='1.1.6';var each=_.each=_.forEach=function(obj,iterator,context){if(obj==null)return;if(nativeForEach&&obj.forEach===nativeForEach){obj.forEach(iterator,context);}else if(_.isNumber(obj.length)){for(var i=0,l=obj.length;i<l;i++){if(iterator.call(context,obj[i],i,obj)===breaker)return;}}else{for(var key in obj){if(hasOwnProperty.call(obj,key)){if(iterator.call(context,obj[key],key,obj)===breaker)return;}}}};_.map=function(obj,iterator,context){var results=[];if(obj==null)return results;if(nativeMap&&obj.map===nativeMap)return obj.map(iterator,context);each(obj,function(value,index,list){results[results.length]=iterator.call(context,value,index,list);});return results;};_.reduce=_.foldl=_.inject=function(obj,iterator,memo,context){var initial=memo!==void 0;if(obj==null)obj=[];if(nativeReduce&&obj.reduce===nativeReduce){if(context)iterator=_.bind(iterator,context);return initial?obj.reduce(iterator,memo):obj.reduce(iterator);}
|
628
628
|
each(obj,function(value,index,list){if(!initial&&index===0){memo=value;initial=true;}else{memo=iterator.call(context,memo,value,index,list);}});if(!initial)throw new TypeError("Reduce of empty array with no initial value");return memo;};_.reduceRight=_.foldr=function(obj,iterator,memo,context){if(obj==null)obj=[];if(nativeReduceRight&&obj.reduceRight===nativeReduceRight){if(context)iterator=_.bind(iterator,context);return memo!==void 0?obj.reduceRight(iterator,memo):obj.reduceRight(iterator);}
|
@@ -653,17 +653,17 @@ model.unbind('all',this._onModelEvent);},_onModelEvent:function(ev,model,collect
|
|
653
653
|
if(model&&ev==='change:'+model.idAttribute){delete this._byId[model.previous(model.idAttribute)];this._byId[model.id]=model;}
|
654
654
|
this.trigger.apply(this,arguments);}});var methods=['forEach','each','map','reduce','reduceRight','find','detect','filter','select','reject','every','all','some','any','include','contains','invoke','max','min','sortBy','sortedIndex','toArray','size','first','rest','last','without','indexOf','lastIndexOf','isEmpty'];_.each(methods,function(method){Backbone.Collection.prototype[method]=function(){return _[method].apply(_,[this.models].concat(_.toArray(arguments)));};});Backbone.Router=function(options){options||(options={});if(options.routes)this.routes=options.routes;this._bindRoutes();this.initialize.apply(this,arguments);};var namedParam=/:([\w\d]+)/g;var splatParam=/\*([\w\d]+)/g;var escapeRegExp=/[-[\]{}()+?.,\\^$|#\s]/g;_.extend(Backbone.Router.prototype,Backbone.Events,{initialize:function(){},route:function(route,name,callback){Backbone.history||(Backbone.history=new Backbone.History);if(!_.isRegExp(route))route=this._routeToRegExp(route);Backbone.history.route(route,_.bind(function(fragment){var args=this._extractParameters(route,fragment);callback.apply(this,args);this.trigger.apply(this,['route:'+name].concat(args));},this));},navigate:function(fragment,triggerRoute){Backbone.history.navigate(fragment,triggerRoute);},_bindRoutes:function(){if(!this.routes)return;var routes=[];for(var route in this.routes){routes.unshift([route,this.routes[route]]);}
|
655
655
|
for(var i=0,l=routes.length;i<l;i++){this.route(routes[i][0],routes[i][1],this[routes[i][1]]);}},_routeToRegExp:function(route){route=route.replace(escapeRegExp,"\\$&").replace(namedParam,"([^\/]*)").replace(splatParam,"(.*?)");return new RegExp('^'+route+'$');},_extractParameters:function(route,fragment){return route.exec(fragment).slice(1);}});Backbone.History=function(){this.handlers=[];_.bindAll(this,'checkUrl');};var hashStrip=/^#*/;var isExplorer=/msie [\w.]+/;var historyStarted=false;_.extend(Backbone.History.prototype,{interval:50,getFragment:function(fragment,forcePushState){if(fragment==null){if(this._hasPushState||forcePushState){fragment=window.location.pathname;var search=window.location.search;if(search)fragment+=search;if(fragment.indexOf(this.options.root)==0)fragment=fragment.substr(this.options.root.length);}else{fragment=window.location.hash;}}
|
656
|
-
return fragment.replace(hashStrip,'');},start:function(options){if(historyStarted)throw new Error("Backbone.history has already been started");this.options=_.extend({},{root:'/'},this.options,options);this._wantsPushState=!!this.options.pushState;this._hasPushState=!!(this.options.pushState&&window.history&&window.history.pushState);var fragment=this.getFragment();var docMode=document.documentMode;var oldIE=(isExplorer.exec(navigator.userAgent.toLowerCase())&&(!docMode||docMode<=7));if(oldIE){this.iframe=$('<iframe src="javascript:0" tabindex="-1" />').hide().appendTo('body')[0].contentWindow;this.navigate(fragment);}
|
657
|
-
if(this._hasPushState){$(window).bind('popstate',this.checkUrl);}else if('onhashchange'in window&&!oldIE){$(window).bind('hashchange',this.checkUrl);}else{setInterval(this.checkUrl,this.interval);}
|
656
|
+
return fragment.replace(hashStrip,'');},start:function(options){if(historyStarted)throw new Error("Backbone.history has already been started");this.options=_.extend({},{root:'/'},this.options,options);this._wantsPushState=!!this.options.pushState;this._hasPushState=!!(this.options.pushState&&window.history&&window.history.pushState);var fragment=this.getFragment();var docMode=document.documentMode;var oldIE=(isExplorer.exec(navigator.userAgent.toLowerCase())&&(!docMode||docMode<=7));if(oldIE){this.iframe=$o('<iframe src="javascript:0" tabindex="-1" />').hide().appendTo('body')[0].contentWindow;this.navigate(fragment);}
|
657
|
+
if(this._hasPushState){$o(window).bind('popstate',this.checkUrl);}else if('onhashchange'in window&&!oldIE){$o(window).bind('hashchange',this.checkUrl);}else{setInterval(this.checkUrl,this.interval);}
|
658
658
|
this.fragment=fragment;historyStarted=true;var loc=window.location;var atRoot=loc.pathname==this.options.root;if(this._wantsPushState&&!this._hasPushState&&!atRoot){this.fragment=this.getFragment(null,true);window.location.replace(this.options.root+'#'+this.fragment);return true;}else if(this._wantsPushState&&this._hasPushState&&atRoot&&loc.hash){this.fragment=loc.hash.replace(hashStrip,'');window.history.replaceState({},document.title,loc.protocol+'//'+loc.host+this.options.root+this.fragment);}
|
659
659
|
return this.loadUrl();},route:function(route,callback){this.handlers.unshift({route:route,callback:callback});},checkUrl:function(e){var current=this.getFragment();if(current==this.fragment&&this.iframe)current=this.getFragment(this.iframe.location.hash);if(current==this.fragment||current==decodeURIComponent(this.fragment))return false;if(this.iframe)this.navigate(current);this.loadUrl()||this.loadUrl(window.location.hash);},loadUrl:function(fragmentOverride){var fragment=this.fragment=this.getFragment(fragmentOverride);var matched=_.any(this.handlers,function(handler){if(handler.route.test(fragment)){handler.callback(fragment);return true;}});return matched;},navigate:function(fragment,triggerRoute){var frag=(fragment||'').replace(hashStrip,'');if(this.fragment==frag||this.fragment==decodeURIComponent(frag))return;if(this._hasPushState){var loc=window.location;if(frag.indexOf(this.options.root)!=0)frag=this.options.root+frag;this.fragment=frag;window.history.pushState({},document.title,loc.protocol+'//'+loc.host+frag);}else{window.location.hash=this.fragment=frag;if(this.iframe&&(frag!=this.getFragment(this.iframe.location.hash))){this.iframe.document.open().close();this.iframe.location.hash=frag;}}
|
660
|
-
if(triggerRoute)this.loadUrl(fragment);}});Backbone.View=function(options){this.cid=_.uniqueId('view');this._configure(options||{});this._ensureElement();this.delegateEvents();this.initialize.apply(this,arguments);};var selectorDelegate=function(selector){return $(selector,this.el);};var eventSplitter=/^(\S+)\s*(.*)$/;var viewOptions=['model','collection','el','id','attributes','className','tagName'];_.extend(Backbone.View.prototype,Backbone.Events,{tagName:'div',$:selectorDelegate,initialize:function(){},render:function(){return this;},remove:function(){$(this.el).remove();return this;},make:function(tagName,attributes,content){var el=document.createElement(tagName);if(attributes)$(el).attr(attributes);if(content)$(el).html(content);return el;},delegateEvents:function(events){if(!(events||(events=this.events)))return;$(this.el).unbind('.delegateEvents'+this.cid);for(var key in events){var method=this[events[key]];if(!method)throw new Error('Event "'+events[key]+'" does not exist');var match=key.match(eventSplitter);var eventName=match[1],selector=match[2];method=_.bind(method,this);eventName+='.delegateEvents'+this.cid;if(selector===''){$(this.el).bind(eventName,method);}else{$(this.el).delegate(selector,eventName,method);}}},_configure:function(options){if(this.options)options=_.extend({},this.options,options);for(var i=0,l=viewOptions.length;i<l;i++){var attr=viewOptions[i];if(options[attr])this[attr]=options[attr];}
|
661
|
-
this.options=options;},_ensureElement:function(){if(!this.el){var attrs=this.attributes||{};if(this.id)attrs.id=this.id;if(this.className)attrs['class']=this.className;this.el=this.make(this.tagName,attrs);}else if(_.isString(this.el)){this.el=$(this.el).get(0);}}});var extend=function(protoProps,classProps){var child=inherits(this,protoProps,classProps);child.extend=this.extend;return child;};Backbone.Model.extend=Backbone.Collection.extend=Backbone.Router.extend=Backbone.View.extend=extend;var methodMap={'create':'POST','update':'PUT','delete':'DELETE','read':'GET'};Backbone.sync=function(method,model,options){var type=methodMap[method];var params=_.extend({type:type,dataType:'json'},options);if(!params.url){params.url=getUrl(model)||urlError();}
|
660
|
+
if(triggerRoute)this.loadUrl(fragment);}});Backbone.View=function(options){this.cid=_.uniqueId('view');this._configure(options||{});this._ensureElement();this.delegateEvents();this.initialize.apply(this,arguments);};var selectorDelegate=function(selector){return $o(selector,this.el);};var eventSplitter=/^(\S+)\s*(.*)$/;var viewOptions=['model','collection','el','id','attributes','className','tagName'];_.extend(Backbone.View.prototype,Backbone.Events,{tagName:'div',$:selectorDelegate,initialize:function(){},render:function(){return this;},remove:function(){$o(this.el).remove();return this;},make:function(tagName,attributes,content){var el=document.createElement(tagName);if(attributes)$o(el).attr(attributes);if(content)$o(el).html(content);return el;},delegateEvents:function(events){if(!(events||(events=this.events)))return;$o(this.el).unbind('.delegateEvents'+this.cid);for(var key in events){var method=this[events[key]];if(!method)throw new Error('Event "'+events[key]+'" does not exist');var match=key.match(eventSplitter);var eventName=match[1],selector=match[2];method=_.bind(method,this);eventName+='.delegateEvents'+this.cid;if(selector===''){$o(this.el).bind(eventName,method);}else{$o(this.el).delegate(selector,eventName,method);}}},_configure:function(options){if(this.options)options=_.extend({},this.options,options);for(var i=0,l=viewOptions.length;i<l;i++){var attr=viewOptions[i];if(options[attr])this[attr]=options[attr];}
|
661
|
+
this.options=options;},_ensureElement:function(){if(!this.el){var attrs=this.attributes||{};if(this.id)attrs.id=this.id;if(this.className)attrs['class']=this.className;this.el=this.make(this.tagName,attrs);}else if(_.isString(this.el)){this.el=$o(this.el).get(0);}}});var extend=function(protoProps,classProps){var child=inherits(this,protoProps,classProps);child.extend=this.extend;return child;};Backbone.Model.extend=Backbone.Collection.extend=Backbone.Router.extend=Backbone.View.extend=extend;var methodMap={'create':'POST','update':'PUT','delete':'DELETE','read':'GET'};Backbone.sync=function(method,model,options){var type=methodMap[method];var params=_.extend({type:type,dataType:'json'},options);if(!params.url){params.url=getUrl(model)||urlError();}
|
662
662
|
if(!params.data&&model&&(method=='create'||method=='update')){params.contentType='application/json';params.data=JSON.stringify(model.toJSON());}
|
663
663
|
if(Backbone.emulateJSON){params.contentType='application/x-www-form-urlencoded';params.data=params.data?{model:params.data}:{};}
|
664
664
|
if(Backbone.emulateHTTP){if(type==='PUT'||type==='DELETE'){if(Backbone.emulateJSON)params.data._method=type;params.type='POST';params.beforeSend=function(xhr){xhr.setRequestHeader('X-HTTP-Method-Override',type);};}}
|
665
665
|
if(params.type!=='GET'){params.processData=false;}
|
666
|
-
return
|
666
|
+
return $o.ajax(params);};var ctor=function(){};var inherits=function(parent,protoProps,staticProps){var child;if(protoProps&&protoProps.hasOwnProperty('constructor')){child=protoProps.constructor;}else{child=function(){return parent.apply(this,arguments);};}
|
667
667
|
_.extend(child,parent);ctor.prototype=parent.prototype;child.prototype=new ctor();if(protoProps)_.extend(child.prototype,protoProps);if(staticProps)_.extend(child,staticProps);child.prototype.constructor=child;child.__super__=parent.prototype;return child;};var getUrl=function(object){if(!(object&&object.url))return null;return _.isFunction(object.url)?object.url():object.url;};var urlError=function(){throw new Error('A "url" property or function must be specified');};var wrapError=function(onError,model,options){return function(resp){if(onError){onError(model,resp,options);}else{model.trigger('error',model,resp,options);}};};var escapeHTML=function(string){return string.replace(/&(?!\w+;|#\d+;|#x[\da-f]+;)/gi,'&').replace(/</g,'<').replace(/>/g,'>').replace(/"/g,'"').replace(/'/g,''').replace(/\//g,'/');};}).call(this);(function(){var test=document.createElement('input');try{test.type='range';if(test.type=='range')
|
668
668
|
return;}catch(e){return;}
|
669
669
|
if(!document.mozSetImageElement||!('MozAppearance'in test.style))
|
@@ -702,32 +702,39 @@ function draw(attrsModified){calc();if(isChanged&&value!=prevValue)
|
|
702
702
|
slider.dispatchEvent(onChange);isChanged=false;if(!attrsModified&&value==prevValue)
|
703
703
|
return;prevValue=value;var position=range?(value-min)/range*100:0;var bg='-moz-element(#__sliderthumb__) '+position+'% no-repeat, ';style(slider,{background:bg+track});}}
|
704
704
|
function style(element,styles){for(var prop in styles)
|
705
|
-
element.style.setProperty(prop,styles[prop],'important');}})();(function(){$('head').append('<style rel="stylesheet" type="text/css">button{font-size:
|
706
|
-
|
707
|
-
|
708
|
-
|
709
|
-
|
710
|
-
if(
|
711
|
-
|
705
|
+
element.style.setProperty(prop,styles[prop],'important');}})();(function(){$o('head').append('<style rel="stylesheet" type="text/css">button{font-size:9px;margin:0 3px;padding:0 3px}#overlay_me_page_container{position:relative}#overlay_me_menu{position:fixed;right:0;z-index:990}#overlay_me_menu *{line-height:14px}#overlay_me_menu .drag-me{line-height:100%;display:block;color:black;font-size:.7em;text-align:center;background-image:-webkit-gradient(linear,0deg,0deg,color-stop(0%,#999),color-stop(30%,#ddd),color-stop(70%,#ddd),color-stop(100%,#999));background-image:-webkit-linear-gradient(0deg,#999,#ddd 30%,#ddd 70%,#999 100%);background-image:-moz-linear-gradient(0deg,#999,#ddd 30%,#ddd 70%,#999 100%);background-image:-o-linear-gradient(0deg,#999,#ddd 30%,#ddd 70%,#999 100%);background-image:-ms-linear-gradient(0deg,#999,#ddd 30%,#ddd 70%,#999 100%);background-image:linear-gradient(0deg,#999,#ddd 30%,#ddd 70%,#999 100%);padding:1px}#overlay_me_menu .drag-me:hover{cursor:move}#overlay_me_menu ul{list-style:none;margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}.menu-item{text-align:left;background-color:#CCC;border:1px solid rgba(255,255,255,0.2);width:200px}.menu-item a.collaps-button{cursor:pointer;position:absolute;padding-top:9px;padding-left:5px;width:13px;height:9px;border:none;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAAJCAYAAADpeqZqAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAIlJREFUeNpivHDhQujz589TmZiYvjMQAP/+/eOQkZGZyfD//38ZIL77nzhwG4ilQJpA2BiIPxHQ8BGIDUHqYZpAOIWApiSYWmRNIDfPxaYaKD4bWR2KJiDmA+KzaHrOQMVxagJhfSD+ALXhA5TPQEgTCCcD8V+gpmRs8rg0MQI1eANpJmzyAAEGAKD/bax/HrzbAAAAAElFTkSuQmCC) no-repeat center 3px}.menu-item a.collaps-button span{display:none;color:yellow}.menu-item a.collaps-button span:hover{color:yellow}.menu-item label.title{padding-left:20px;color:white;cursor:pointer;width:187px;line-height:1.1em;font-size:14px;background:none}.menu-item.collapsed .item-content{display:none}.menu-item.collapsed a.collaps-button{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAANCAYAAAB7AEQGAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAKtJREFUeNpiuHz5ctD///+lgJgBF2Z68uRJOgMDw0EgNmTAAZiA4AeQVgHiA0CchFUREpsPiOcCjZ8NZWNVBAaMjIwpQGofEOvjVAQFxkATDwJxMkgNCy7HAk3kB1KzgApf4DIJBD4CcRpQ8TZcJp2D+vQiVjcBjZ8HpBxhCtAVfQbiVKDxIMd+QtbI8u/fP04gfQ+Iw4D4LDa7WSQlJUGBdxyIn+DyAUCAAQDxsEXD9kreLQAAAABJRU5ErkJggg==) no-repeat center top}#overlay_panel .content-mgnt-block{position:relative;line-height:10px}#overlay_panel .content-mgnt-block .unicorns{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAYAAAA71pVKAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAklJREFUeNqEks1u00AQx3d27V3HdezY+SBpkKBFoBZxQEKIOwfegBs3rtwoPABvw3sgceKAuFWtUBBSaT6ctvHXer2zOElTVaoKI/2lWWl/O//ZGZi8jgSPxFv3JX93+CJvfJ4/09++vzH6S/SVH59+IohH5JagxBilC4zNHHigSLvtTCPRnLYxtB4b29ojGglBc1PG1PAyLfUxzszIX7B86MwLP/iVkS566DWeEgo+gfrWdV1VJoZgpUdqon84p1a+wxI1CA+l3Z+yqu89N5a9v65EVgK8TOpgH/edZS6JAZ97/AkfKjF3pTpRkUrlfQFnoGlaHNc2F0sAzPIFWIl9WMEGTYUZJfyB12ED2l9UE6bkDAcoy+0QznXJ8nIEBosNuIb3xLoBNIlRhNlc7Ho9dDA6l1OC8gKGUGEnhAyBFmpSu8zqf9jAzqZ/RIUxFDR0G2LQ6ueIwUzGFIuE95livS4p2RaUVQYas/p+xQ4eiavPqO2nKPUcCrvlCR50uqlirXGeiUWeua4uva6vebNDwHIJErq2fW0Mdfcxpjqmqe37Nnd73US64Ummt8a5bCpZhh5UrZanfS9gBw/5tcorGSz1TJ/rCTljoomOGDTLsh+NUz8Ypdz/ndBwlpFeIdn7Hevm9miD9QNxdVGNSQzGSR3ao6Duekm23fqT3Al/Ju3waAEnr1xyayxnymhgNcU9Z7sx5LtWA+6bquxXaeLr5J+wMZebRQwDiwW2x0O7I1y7ZxOrS+X/4Y0DXJ0pANhgM4sKRv4KMACD6UDbVgTzkgAAAABJRU5ErkJggg==) no-repeat center center;width:15px;height:15px;position:absolute;right:0;top:6px}#overlay_panel label{margin:0;font-size:14px}#overlay_panel .content-mgnt-block,#overlay_panel #images_mgnt{text-align:left;padding:3px 4px;margin:2px;border:1px #777 solid;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;-o-border-radius:5px;border-radius:5px}#overlay_panel .content-mgnt-block legend,#overlay_panel #images_mgnt legend{font-size:10px;padding:0 3px;margin-left:10px}#overlay_panel .slider-block{display:block}#overlay_panel .slider-block label{font-size:70%;margin:0 5px 0 0;vertical-align:top}#overlay_panel .slider-block input[type=range]{margin:0}#overlay_panel #images_mgnt{width:186px}#overlay_panel #images_mgnt .controls{padding-bottom:5px}#overlay_panel #images_mgnt .controls label{margin-right:5px}#overlay_panel #images_mgnt .overlay-image-block{text-align:left;position:relative;width:186px;border:1px solid rgba(255,255,255,0.2);border-right:none;border-left:none}#overlay_panel #images_mgnt .overlay-image-block.hovered{background-color:rgba(255,255,0,0.5)}#overlay_panel #images_mgnt .overlay-image-block .del-button{position:absolute;right:0;top:0;margin:1px;cursor:pointer;border:1px #AAA solid;font-size:10px;line-height:13px;background-color:#444;color:white;font-weight:bold;padding:0 3px}#overlay_panel #images_mgnt .dynamic-adds label{font-size:75%}#overlay_panel #images_mgnt .dynamic-adds input{width:95px;font-size:10px}#overlay_panel input[type=checkbox],#overlay_panel label,#overlay_panel #contentSlider,#overlay_panel .zindex-switch{display:inline}#overlay_panel input[type=checkbox]{vertical-align:middle;margin:-3px 5px 0 0}#overlay_me_images_container{position:absolute;z-index:4;top:0;left:0}#overlay_me_images_container div{position:absolute}#overlay_me_images_container div.highlight{border:2px solid red;margin-top:-2px;margin-left:-2px}#overlay_me_images_container div:hover{cursor:move}#overlay_me_images_container img{position:absolute;top:0;left:0}#overlay_me_menu.collapsed .drag-me,#overlay_me_menu.collapsed .menu-item{width:25px}#overlay_me_menu.collapsed .drag-me{height:10px;overflow:hidden}#overlay_me_menu.collapsed button{height:10px;overflow:hidden}#overlay_me_menu.collapsed .overlay-image-block{height:14px;margin-top:3px}#overlay_me_menu.collapsed .overlay-image-block label,#overlay_me_menu.collapsed #content_div_management_block,#overlay_me_menu.collapsed .controls,#overlay_me_menu.collapsed input[type=range],#overlay_me_menu.collapsed #overlay_panel #contentSlider,#overlay_me_menu.collapsed legend,#overlay_me_menu.collapsed .dynamic-adds,#overlay_me_menu.collapsed .unicorns,#overlay_me_menu.collapsed button.reset,#overlay_me_menu.collapsed button.hide,#overlay_me_menu.collapsed button.del-button{display:none}</style>');window.OverlayMe={};window.OverlayMe.Mixin={};OverlayMe.isLoaded=function(){return window.overlay_me_loaded;};OverlayMe.isMobile=function(){return navigator.userAgent.match(/(iPhone|iPod|iPad|Android)/);};OverlayMe.mustLoad=function(){return!OverlayMe.isLoaded()&&!OverlayMe.isMobile();};OverlayMe.clearAndReload=function(){localStorage.clear();return window.location.reload();};}).call(this);(function(){OverlayMe.Mixin.Storable={loadCss:function(element,default_css){var cssData;if(element==null){element=this.el;}
|
706
|
+
if((cssData=localStorage.getItem(this.id))){return $o(element).css(JSON.parse(cssData));}else{if(default_css!==void 0){return $o(element).css(default_css);}}},saveCss:function(element){var cssData,css_attribute,_i,_len,_ref;if(element==null){element=this.el;}
|
707
|
+
if(!this.css_attributes_to_save){this.css_attributes_to_save=['top','left','display','opacity'];}
|
708
|
+
cssData={};_ref=this.css_attributes_to_save;for(_i=0,_len=_ref.length;_i<_len;_i++){css_attribute=_ref[_i];cssData[css_attribute]=$o(element).css(css_attribute);}
|
709
|
+
return localStorage.setItem(this.id,JSON.stringify(cssData));}};}).call(this);(function(){OverlayMe.Mixin.Hideable={isDisplayed:function(){return $o(this.el).css('display')!=='none';},toggleDisplay:function(default_display_type){if(default_display_type==null){default_display_type='block';}
|
710
|
+
if(this.isDisplayed()){$o(this.el).css({display:'none'});}else{$o(this.el).css({display:default_display_type});}
|
711
|
+
return this.saveCss();}};}).call(this);(function(){var __hasProp={}.hasOwnProperty,__extends=function(child,parent){for(var key in parent){if(__hasProp.call(parent,key))child[key]=parent[key];}function ctor(){this.constructor=child;}ctor.prototype=parent.prototype;child.prototype=new ctor;child.__super__=parent.prototype;return child;};OverlayMe.Draggable=(function(_super){__extends(Draggable,_super);Draggable.name='Draggable';function Draggable(){return Draggable.__super__.constructor.apply(this,arguments);}
|
712
|
+
Draggable.prototype.tagName='div';Draggable.prototype.css_attributes_to_save=['top','left','display','opacity'];Draggable.prototype.initialize=function(attributes,options){Draggable.__super__.initialize.call(this,attributes,options);return this.loadCss(this.el,options.default_css);};Draggable.prototype.engageMove=function(event){var _this=this;event.preventDefault();this.moving=true;this.lastX=event.clientX;this.lastY=event.clientY;$o(window).bind('mymousemove',function(event,mouseEvent){_this.updateOverlay(mouseEvent.clientX-_this.lastX,mouseEvent.clientY-_this.lastY);_this.lastX=mouseEvent.clientX;return _this.lastY=mouseEvent.clientY;});return $o(this.el).addClass('on-move');};Draggable.prototype.endMove=function(event){this.moving=false;$o(window).unbind('mymousemove');return $o(this.el).removeClass('on-move');};Draggable.prototype.toggleMove=function(event){if(this.moving){return this.endMove(event);}else{return this.engageMove(event);}};Draggable.prototype.updateOverlay=function(x,y){var newX,newY;newX=parseInt($o(this.el).css('left'))+x;newY=parseInt($o(this.el).css('top'))+y;$o(this.el).css({top:""+newY+"px",left:""+newX+"px"});return this.saveCss();};Draggable.prototype.render=function(){return this.el;};return Draggable;})(Backbone.View);_.extend(OverlayMe.Draggable.prototype,OverlayMe.Mixin.Storable);_.extend(OverlayMe.Draggable.prototype,OverlayMe.Mixin.Hideable);}).call(this);(function(){var __hasProp={}.hasOwnProperty,__extends=function(child,parent){for(var key in parent){if(__hasProp.call(parent,key))child[key]=parent[key];}function ctor(){this.constructor=child;}ctor.prototype=parent.prototype;child.prototype=new ctor;child.__super__=parent.prototype;return child;};OverlayMe.MenuClass=(function(_super){__extends(MenuClass,_super);MenuClass.name='MenuClass';function MenuClass(){return MenuClass.__super__.constructor.apply(this,arguments);}
|
713
|
+
MenuClass.prototype.id='overlay_me_menu';MenuClass.prototype.initialize=function(attributes){var drag_me_line,_this=this;MenuClass.__super__.initialize.call(this,attributes,{default_css:{top:'50px'}});drag_me_line=(new Backbone.View).make('div',{"class":'drag-me'},'Drag me up and down');this.menu_list=(new Backbone.View).make('ul');$o(this.el).append(drag_me_line);$o(this.el).append(this.menu_list);$o('body').append(this.render());$o(drag_me_line).bind('mousedown',function(event){return _this.toggleMove(event);});$o(window).bind('mouseup',function(event){return _this.endMove(event);});return $o(window).bind('overlay_me:toggle_all_display',function(){return _this.toggleDisplay();});};MenuClass.prototype.append=function(element){return this.menu_list.appendChild(element);};MenuClass.prototype.toggleCollapse=function(){if($o(this.el).hasClass('collapsed')){return $o(this.el).removeClass('collapsed');}else{return $o(this.el).addClass('collapsed');}};return MenuClass;})(OverlayMe.Draggable);if(!OverlayMe.menu_box){OverlayMe.menu=new OverlayMe.MenuClass();}}).call(this);(function(){var __hasProp={}.hasOwnProperty,__extends=function(child,parent){for(var key in parent){if(__hasProp.call(parent,key))child[key]=parent[key];}function ctor(){this.constructor=child;}ctor.prototype=parent.prototype;child.prototype=new ctor;child.__super__=parent.prototype;return child;};OverlayMe.MenuItem=(function(_super){__extends(MenuItem,_super);MenuItem.name='MenuItem';function MenuItem(){return MenuItem.__super__.constructor.apply(this,arguments);}
|
714
|
+
MenuItem.prototype.tagName='li';MenuItem.prototype.className='menu-item';MenuItem.prototype.initialize=function(attributes,options){var _this=this;this.id=attributes.id;this.el.appendChild(this.collapseButton());this.title=this.make('label',{"class":'title'},attributes.title);$o(this.title).bind('click',function(){return _this.toggleCollapse();});this.el.appendChild(this.title);this.content=this.make('div',{"class":'item-content'});this.el.appendChild(this.content);this.collapsed=(localStorage.getItem(""+this.id+"-collapsed")===''?false:true);return this.setCollapse(this.collapsed);};MenuItem.prototype.collapseButton=function(){var _this=this;this.collapseButton=this.make('a',{"class":'collaps-button'},'<span>o</span>');$o(this.collapseButton).bind('click',function(){return _this.toggleCollapse();});return this.collapseButton;};MenuItem.prototype.toggleCollapse=function(){this.collapsed=!this.collapsed;this.setCollapse(this.collapsed);return this.saveState();};MenuItem.prototype.setCollapse=function(toCollapse){if(toCollapse){return $o(this.el).addClass('collapsed');}else{return $o(this.el).removeClass('collapsed');}};MenuItem.prototype.append=function(childElemt){return this.content.appendChild(childElemt);};MenuItem.prototype.render=function(){return this.el;};MenuItem.prototype.saveState=function(){return localStorage.setItem(""+this.id+"-collapsed",(this.collapsed?1:''));};return MenuItem;})(Backbone.View);}).call(this);(function(){var basics_panel,clear_all_button,collapse_button,hide_button,_this=this;if(OverlayMe.mustLoad()){basics_panel=new OverlayMe.MenuItem({id:"bacis-options",title:"Basics"});collapse_button=(new Backbone.View).make('button',{"class":'collapse'},'Collapse (c)');$o(collapse_button).bind('click',function(event){return OverlayMe.menu.toggleCollapse();});basics_panel.append(collapse_button);clear_all_button=(new Backbone.View).make('button',{"class":'reset',onClick:"javascript: OverlayMe.clearAndReload()"},'Reset All (r)');basics_panel.append(clear_all_button);hide_button=(new Backbone.View).make('button',{"class":'hide'},'Hide (h)');$o(hide_button).bind('click',function(event){return $o(window).trigger('overlay_me:toggle_all_display');});basics_panel.append(hide_button);OverlayMe.menu.append(basics_panel.render());$o(window).bind('keypress',function(event){if(event.charCode===104){$o(window).trigger('overlay_me:toggle_all_display');}
|
715
|
+
if(event.charCode===99){OverlayMe.menu.toggleCollapse();}
|
716
|
+
if(event.charCode===114){return OverlayMe.clearAndReload();}});}}).call(this);(function(){OverlayMe.Overlays={};OverlayMe.Overlays.urlToId=function(url){return url.replace(/[.:\/]/g,'_').replace(/[^a-zA-Z0-9_\-]/g,'');};OverlayMe.unicorns=["http://fc07.deviantart.net/fs49/f/2009/200/b/3/Fat_Unicorn_and_the_Rainbow_by_la_ratta.jpg","http://www.deviantart.com/download/126388773/Unicorn_Pukes_Rainbow_by_Angel35W.jpg","http://macmcrae.com/wp-content/uploads/2010/02/unicorn.jpg","http://4.bp.blogspot.com/-uPLiez-m9vY/TacC_Bmsn3I/AAAAAAAAAyg/jusQIA8aAME/s1600/Behold_A_Rainbow_Unicorn_Ninja_by_Jess4921.jpg","http://www.everquestdragon.com/everquestdragon/main/image.axd?picture=2009%2F9%2FPaperPaperNewrainbow.png"];}).call(this);(function(){var __hasProp={}.hasOwnProperty,__extends=function(child,parent){for(var key in parent){if(__hasProp.call(parent,key))child[key]=parent[key];}function ctor(){this.constructor=child;}ctor.prototype=parent.prototype;child.prototype=new ctor;child.__super__=parent.prototype;return child;};OverlayMe.Overlays.ImagesContainer=(function(_super){__extends(ImagesContainer,_super);ImagesContainer.name='ImagesContainer';function ImagesContainer(){return ImagesContainer.__super__.constructor.apply(this,arguments);}
|
717
|
+
ImagesContainer.prototype.id='overlay_me_images_container';ImagesContainer.prototype.css_attributes_to_save=['display'];ImagesContainer.prototype.initialize=function(){var container,_this=this;container=$o('#overlay_me_images_container');if(container.length<1){container=this.make('div',{id:'overlay_me_images_container'});$o('body').append(container);this.el=container;}
|
718
|
+
this.loadCss();return $o(window).bind('overlay_me:toggle_all_display',function(){return _this.toggleDisplay();});};return ImagesContainer;})(Backbone.View);_.extend(OverlayMe.Overlays.ImagesContainer.prototype,OverlayMe.Mixin.Storable);_.extend(OverlayMe.Overlays.ImagesContainer.prototype,OverlayMe.Mixin.Hideable);}).call(this);(function(){var __hasProp={}.hasOwnProperty,__extends=function(child,parent){for(var key in parent){if(__hasProp.call(parent,key))child[key]=parent[key];}function ctor(){this.constructor=child;}ctor.prototype=parent.prototype;child.prototype=new ctor;child.__super__=parent.prototype;return child;};OverlayMe.Overlays.DraggableImage=(function(_super){__extends(DraggableImage,_super);DraggableImage.name='DraggableImage';function DraggableImage(){return DraggableImage.__super__.constructor.apply(this,arguments);}
|
719
|
+
DraggableImage.prototype.initialize=function(attributes,options){var _this=this;DraggableImage.__super__.initialize.call(this,attributes,options);this.image=new Image();$o(this.image).load(function(){return _this.fitDivToImage();});$o(this.image).attr('src',options.image_src);$o(this.el).append(this.image);if($o(this.el).css('left')==='auto'||$o(this.el).css('left')===''){$o(this.el).css('left','0px');}
|
720
|
+
if($o(this.el).css('top')==='auto'||$o(this.el).css('top')===''){$o(this.el).css('top','0px');}
|
721
|
+
$o(this.el).bind('mousedown',function(event){return _this.toggleMove(event);});$o(window).bind('mouseup',function(event){return _this.endMove(event);});$o(this.el).bind('mouseover',function(event){return $o(".overlay-image-block[data-img-id="+_this.id+"]").addClass('hovered');});return $o(this.el).bind('mouseout',function(event){return $o(".overlay-image-block[data-img-id="+_this.id+"]").removeClass('hovered');});};DraggableImage.prototype.fitDivToImage=function(){if(this.image.width>0){$o(this.el).css('width',this.image.width);return $o(this.el).css('height',this.image.height);}};DraggableImage.prototype.render=function(){return this.el;};return DraggableImage;})(OverlayMe.Draggable);}).call(this);(function(){var __hasProp={}.hasOwnProperty,__extends=function(child,parent){for(var key in parent){if(__hasProp.call(parent,key))child[key]=parent[key];}function ctor(){this.constructor=child;}ctor.prototype=parent.prototype;child.prototype=new ctor;child.__super__=parent.prototype;return child;};OverlayMe.Overlays.Image=(function(_super){__extends(Image,_super);Image.name='Image';function Image(){return Image.__super__.constructor.apply(this,arguments);}
|
712
722
|
Image.prototype.tagName='div';Image.prototype.className='overlay-image-block';Image.prototype.initialize=function(image_src,options){var slider_block,_this=this;if(options==null){options={destroyable:false};}
|
713
|
-
this.image_src=image_src;this.image_id=OverlayMe.Overlays.urlToId(image_src);$(this.el).attr('data-img-id',this.image_id);
|
714
|
-
this.default_css
|
715
|
-
$(this.el).append(this.checkbox());$(this.el).append(this.label());slider_block=this.make('div',{"class":'slider-block'});$(this.el).append(slider_block);slider_block.appendChild(this.make('label',{},'Opacity'));slider_block.appendChild(this.slider());if(options.destroyable){$(this.el).append(this.delButton());}
|
716
|
-
$(this.el).bind('click',function(event){return _this.flickCheckbox();});$(this.el).bind('mouseover',function(event){$(_this.image.el).
|
717
|
-
$(this.checkbox).bind('click',function(e){e.stopPropagation();return _this.flickVisibility();});$(this.checkbox).bind('change',function(e){e.stopPropagation();return _this.flickVisibility();});return this.checkbox;};Image.prototype.delButton=function(){var _this=this;this.delButton=this.make('button',{"class":'del-button',title:'Delete'},'x');$(this.delButton).bind('click',function(e){return OverlayMe.dyn_manager.delImage(_this.image_id);});return this.delButton;};Image.prototype.flickCheckbox=function(){this.checkbox.checked=!this.checkbox.checked;return this.flickVisibility();};Image.prototype.flickVisibility=function(){
|
718
|
-
return this.image.saveCss();};Image.prototype.label=function(){return this.label=this.make('label',{},this.image_src.replace(/.*\//,'').slice(-22));};Image.prototype.slider=function(){var _this=this;this.slider=this.make('input',{type:"range",value:$(this.image.el).css('opacity')*100});$(this.slider).bind('click',function(e){return e.stopPropagation();});$(this.slider).bind('change',function(e){$(_this.image.el).css('opacity',$(_this.slider)[0].value/100);return _this.image.saveCss();});$(this.slider).bind('mouseover',function(e){e.stopPropagation();return $(_this.el).addClass('hovered');});$(this.slider).bind('mouseout',function(e){e.stopPropagation();return $(_this.el).removeClass('hovered');});return this.slider;};Image.prototype.render=function(){return this.el;};return Image;})(Backbone.View);}).call(this);(function(){var __hasProp={}.hasOwnProperty,__extends=function(child,parent){for(var key in parent){if(__hasProp.call(parent,key))child[key]=parent[key];}function ctor(){this.constructor=child;}ctor.prototype=parent.prototype;child.prototype=new ctor;child.__super__=parent.prototype;return child;};OverlayMe.Overlays.DynamicManager=(function(_super){__extends(DynamicManager,_super);DynamicManager.name='DynamicManager';function DynamicManager(){return DynamicManager.__super__.constructor.apply(this,arguments);}
|
723
|
+
this.image_src=image_src;this.image_id=OverlayMe.Overlays.urlToId(image_src);$o(this.el).attr('data-img-id',this.image_id);if(!OverlayMe.images_container){OverlayMe.images_container=new OverlayMe.Overlays.ImagesContainer();}
|
724
|
+
this.default_css=$o.extend({display:'none',opacity:0.5},options.default_css);if(!($o("#"+this.image_id,OverlayMe.images_container.el).length>0)){$o(OverlayMe.images_container.el).append(this.image());}
|
725
|
+
$o(this.el).append(this.checkbox());$o(this.el).append(this.label());slider_block=this.make('div',{"class":'slider-block'});$o(this.el).append(slider_block);slider_block.appendChild(this.make('label',{},'Opacity'));slider_block.appendChild(this.slider());if(options.destroyable){$o(this.el).append(this.delButton());}
|
726
|
+
$o(this.el).bind('click',function(event){return _this.flickCheckbox();});$o(this.el).bind('mouseover',function(event){$o(_this.image.el).addClass('highlight');return $o(_this.el).addClass('hovered');});return $o(this.el).bind('mouseout',function(event){$o(_this.image.el).removeClass('highlight');return $o(_this.el).removeClass('hovered');});};Image.prototype.image=function(){this.image=new OverlayMe.Overlays.DraggableImage({id:this.image_id},{image_src:this.image_src,default_css:this.default_css});return this.image.render();};Image.prototype.checkbox=function(){var _this=this;this.checkbox=this.make('input',{type:"checkbox"});if(this.image.isDisplayed()){this.checkbox.checked=true;}
|
727
|
+
$o(this.checkbox).bind('click',function(e){e.stopPropagation();return _this.flickVisibility();});$o(this.checkbox).bind('change',function(e){e.stopPropagation();return _this.flickVisibility();});return this.checkbox;};Image.prototype.delButton=function(){var _this=this;this.delButton=this.make('button',{"class":'del-button',title:'Delete'},'x');$o(this.delButton).bind('click',function(e){return OverlayMe.dyn_manager.delImage(_this.image_id);});return this.delButton;};Image.prototype.flickCheckbox=function(){this.checkbox.checked=!this.checkbox.checked;return this.flickVisibility();};Image.prototype.flickVisibility=function(){if(this.checkbox.checked){$o(this.image.el).css('display','block');}else{$o(this.image.el).css('display','none');}
|
728
|
+
return this.image.saveCss();};Image.prototype.label=function(){return this.label=this.make('label',{},this.image_src.replace(/.*\//,'').slice(-22));};Image.prototype.slider=function(){var _this=this;this.slider=this.make('input',{type:"range",value:$o(this.image.el).css('opacity')*100});$o(this.slider).bind('click',function(e){return e.stopPropagation();});$o(this.slider).bind('change',function(e){$o(_this.image.el).css('opacity',$o(_this.slider)[0].value/100);return _this.image.saveCss();});$o(this.slider).bind('mouseover',function(e){e.stopPropagation();return $o(_this.el).addClass('hovered');});$o(this.slider).bind('mouseout',function(e){e.stopPropagation();return $o(_this.el).removeClass('hovered');});return this.slider;};Image.prototype.render=function(){return this.el;};return Image;})(Backbone.View);}).call(this);(function(){var __hasProp={}.hasOwnProperty,__extends=function(child,parent){for(var key in parent){if(__hasProp.call(parent,key))child[key]=parent[key];}function ctor(){this.constructor=child;}ctor.prototype=parent.prototype;child.prototype=new ctor;child.__super__=parent.prototype;return child;};OverlayMe.Overlays.DynamicManager=(function(_super){__extends(DynamicManager,_super);DynamicManager.name='DynamicManager';function DynamicManager(){return DynamicManager.__super__.constructor.apply(this,arguments);}
|
719
729
|
DynamicManager.prototype.initialize=function(){var listJSON;if((listJSON=localStorage.getItem('dyn_image_list'))){return this.list=JSON.parse(listJSON);}else{return this.list=[];}};DynamicManager.prototype.isPresent=function(image_id){var saved,_i,_len,_ref;_ref=this.list;for(_i=0,_len=_ref.length;_i<_len;_i++){saved=_ref[_i];if(saved.id===image_id){return true;}}
|
720
730
|
return false;};DynamicManager.prototype.isEmpty=function(){return this.list.length===0;};DynamicManager.prototype.addImage=function(src,options){var new_image;if(options==null){options={};}
|
721
731
|
new_image=this.loadImage(src,options);if(new_image&&!this.isPresent(new_image.image_id)){this.list.push({id:new_image.image_id,src:new_image.image_src});this.saveList();}
|
722
732
|
return new_image;};DynamicManager.prototype.loadImage=function(src,options){var image,image_id,_default_css;if(options==null){options={};}
|
723
|
-
image_id=OverlayMe.Overlays.urlToId(src);if(!($("#overlay_me_images_container #"+image_id).length>0)){_default_css
|
733
|
+
image_id=OverlayMe.Overlays.urlToId(src);if(!($o("#overlay_me_images_container #"+image_id).length>0)){_default_css=$o.extend({display:'block'},options.default_css);image=new OverlayMe.Overlays.Image(src,{destroyable:true,default_css:_default_css});OverlayMe.images_management_div.append(image.render());}
|
724
734
|
return image;};DynamicManager.prototype.delImage=function(image_id){var image,_i,_len,_ref;_ref=this.list;for(_i=0,_len=_ref.length;_i<_len;_i++){image=_ref[_i];if(image.id===image_id){this.list.splice(this.list.indexOf(image),1);this.saveList();break;}}
|
725
735
|
return OverlayMe.images_management_div.del(image_id);};DynamicManager.prototype.loadAll=function(){var image,_i,_len,_ref,_results;_ref=this.list;_results=[];for(_i=0,_len=_ref.length;_i<_len;_i++){image=_ref[_i];_results.push(this.addImage(image.src));}
|
726
736
|
return _results;};DynamicManager.prototype.saveList=function(){return localStorage.setItem('dyn_image_list',JSON.stringify(this.list));};return DynamicManager;})(Backbone.Model);}).call(this);(function(){var __hasProp={}.hasOwnProperty,__extends=function(child,parent){for(var key in parent){if(__hasProp.call(parent,key))child[key]=parent[key];}function ctor(){this.constructor=child;}ctor.prototype=parent.prototype;child.prototype=new ctor;child.__super__=parent.prototype;return child;};OverlayMe.Overlays.ContentDivManagementBlock=(function(_super){__extends(ContentDivManagementBlock,_super);ContentDivManagementBlock.name='ContentDivManagementBlock';function ContentDivManagementBlock(){return ContentDivManagementBlock.__super__.constructor.apply(this,arguments);}
|
727
|
-
ContentDivManagementBlock.prototype.tagName='fieldset';ContentDivManagementBlock.prototype.className='content-mgnt-block';ContentDivManagementBlock.prototype.normal_zindex='0';ContentDivManagementBlock.prototype.over_zindex='5';ContentDivManagementBlock.prototype.initialize=function(){var
|
728
|
-
|
729
|
-
|
730
|
-
|
731
|
-
$(this.hideInactivesBox).bind('change',function(event){return _this.hideInactives();});return this.hideInactivesBox;};ImagesManagementDiv.prototype.hideInactives=function(){var checkbox_state;checkbox_state=this.hideInactivesBox.checked;_.each($('.overlay-image-block'),function(img_block){var checkbox,img_id;checkbox=$('input[type=checkbox]',img_block);img_id=$(img_block).attr('data-img-id');if(checkbox_state&&!checkbox.first()[0].checked){$(img_block).hide();return $("#"+img_id).hide();}else{$(img_block).show();return $("#"+img_id).show();}});return this.saveState();};ImagesManagementDiv.prototype.checkAllbox=function(){var _this=this;this.checkAllBox=this.make('input',{type:"checkbox","class":'check-all'});if($(this.checkAllBox).css('visibility')==='visible'){this.checkAllBox.checked=true;}
|
732
|
-
$(this.checkAllBox).bind('change',function(event){return _this.checkAll();});return this.checkAllBox;};ImagesManagementDiv.prototype.checkAll=function(){var checkbox,checkbox_state,_i,_len,_ref;checkbox_state=this.checkAllBox.checked;_ref=$('.overlay-image-block input[type=checkbox]');for(_i=0,_len=_ref.length;_i<_len;_i++){checkbox=_ref[_i];if(checkbox.checked!==checkbox_state){$(checkbox).trigger('click');}}
|
733
|
-
return this.saveState();};ImagesManagementDiv.prototype.saveState=function(){};ImagesManagementDiv.prototype.render=function(){return this.el;};return ImagesManagementDiv;})(Backbone.View);}).call(this);(function(){var overlay_panel;if(OverlayMe.mustLoad()){overlay_panel=new OverlayMe.MenuItem({id:"overlay_panel",title:"Overlays"});overlay_panel.append(new OverlayMe.Overlays.ContentDivManagementBlock().render());OverlayMe.images_management_div=new OverlayMe.Overlays.ImagesManagementDiv();overlay_panel.append(OverlayMe.images_management_div.render());$(OverlayMe.Menu).append(overlay_panel.render());$(window).bind('mousemove',function(event){return $(window).trigger('mymousemove',event);});OverlayMe.dyn_manager=new OverlayMe.Overlays.DynamicManager();OverlayMe.dyn_manager.loadAll();OverlayMe.loadDefaultImage=function(){if(OverlayMe.dyn_manager.isEmpty()){return OverlayMe.dyn_manager.addImage('https://a248.e.akamai.net/assets.github.com/images/modules/about_page/octocat.png');}};$.ajax({url:'/overlay_images',dataType:'json',success:function(data){if(data.length===0){return OverlayMe.loadDefaultImage();}else{return $.each(data,function(index,img_path){return OverlayMe.images_management_div.append(new OverlayMe.Overlays.Image(img_path).render());});}},error:function(){return OverlayMe.loadDefaultImage();}});}}).call(this);(function(){}).call(this);
|
737
|
+
ContentDivManagementBlock.prototype.tagName='fieldset';ContentDivManagementBlock.prototype.className='content-mgnt-block';ContentDivManagementBlock.prototype.id='content_div_management_block';ContentDivManagementBlock.prototype.css_attributes_to_save=['z-index','opacity'];ContentDivManagementBlock.prototype.normal_zindex='0';ContentDivManagementBlock.prototype.over_zindex='5';ContentDivManagementBlock.prototype.initialize=function(){var slider_block,unicorn_button,_this=this;this.page_container_div=this.make('div',{id:'overlay_me_page_container'});$o('body').append(this.page_container_div);$o('body > *').each(function(index,thing){if(!(thing.id.match(/^overlay_me/)||thing.tagName==='SCRIPT')){return $o(_this.page_container_div).append(thing);}});this.loadCss(this.page_container_div,{'z-index':this.normal_zindex});unicorn_button=this.make('div',{"class":'unicorns',title:'Feeling corny?'});$o(unicorn_button).bind('click',function(){return OverlayMe.dyn_manager.addImage(OverlayMe.unicorns[Math.floor(Math.random()*OverlayMe.unicorns.length)],{default_css:{opacity:1}});});$o(this.el).append(unicorn_button);$o(this.el).append(this.make('legend',{},'Page content'));slider_block=this.make('div',{"class":'slider-block'});$o(this.el).append(slider_block);slider_block.appendChild(this.make('label',{},'Opacity'));slider_block.appendChild(this.contentSlider());$o(this.el).append(this.zIndexSwitch());return this.bindEvents();};ContentDivManagementBlock.prototype.zIndexSwitch=function(){var block,label,_this=this;block=this.make('div',{"class":'zindex-switch'});this.zIndexSwitch=this.make('input',{type:"checkbox"});$o(block).append(this.zIndexSwitch);setTimeout(function(){if($o("#overlay_me_page_container").css('z-index')===_this.over_zindex){return _this.zIndexSwitch.checked=true;}},500);label=this.make('label',{},'Content on top (t)');$o(label).bind('click',function(){return $o(_this.zIndexSwitch).trigger('click');});return $o(block).append(label);};ContentDivManagementBlock.prototype.contentSlider=function(){return this.contentSlider=this.make('input',{id:"contentSlider",type:"range",value:$o("#overlay_me_page_container").css('opacity')*100});};ContentDivManagementBlock.prototype.bindEvents=function(){var _this=this;$o(this.contentSlider).bind('change',function(){$o("#overlay_me_page_container").css('opacity',$o(_this.contentSlider)[0].value/100);return _this.saveCss(_this.page_container_div);});$o(this.zIndexSwitch).bind('change',function(event){if(_this.zIndexSwitch.checked){$o("#overlay_me_page_container").css({'z-index':_this.over_zindex});}else{$o("#overlay_me_page_container").css({'z-index':_this.normal_zindex});}
|
738
|
+
return _this.saveCss(_this.page_container_div);});return $o(window).bind('keypress',function(event){if(event.charCode===116){return $o(_this.zIndexSwitch).trigger('click');}});};ContentDivManagementBlock.prototype.render=function(){return this.el;};return ContentDivManagementBlock;})(Backbone.View);_.extend(OverlayMe.Overlays.ContentDivManagementBlock.prototype,OverlayMe.Mixin.Storable);}).call(this);(function(){var __hasProp={}.hasOwnProperty,__extends=function(child,parent){for(var key in parent){if(__hasProp.call(parent,key))child[key]=parent[key];}function ctor(){this.constructor=child;}ctor.prototype=parent.prototype;child.prototype=new ctor;child.__super__=parent.prototype;return child;};OverlayMe.Overlays.ImagesManagementDiv=(function(_super){__extends(ImagesManagementDiv,_super);ImagesManagementDiv.name='ImagesManagementDiv';function ImagesManagementDiv(){return ImagesManagementDiv.__super__.constructor.apply(this,arguments);}
|
739
|
+
ImagesManagementDiv.prototype.tagName='fieldset';ImagesManagementDiv.prototype.id='images_mgnt';ImagesManagementDiv.prototype.initialize=function(){var check_all_label,_this=this;$o(this.el).append(this.make('legend',{},'Overlaying images'));this.controlBlock=this.make('div',{"class":'controls'});$o(this.el).append(this.controlBlock);this.controlBlock.appendChild(this.checkAllbox());check_all_label=this.make('label',{},'All/None');$o(check_all_label).bind('click',function(){return $o(_this.checkAllBox).trigger('click');});this.controlBlock.appendChild(check_all_label);this.overlaysListBlock=this.make('div',{"class":'overlays-list'});$o(this.el).append(this.overlaysListBlock);return $o(this.el).append(this.dynamicAddsBlock());};ImagesManagementDiv.prototype.append=function(block){return this.overlaysListBlock.appendChild(block);};ImagesManagementDiv.prototype.del=function(image_id){$o(".overlay-image-block[data-img-id="+image_id+"]",this.el).remove();return $o("#overlay_me_images_container #"+image_id).remove();};ImagesManagementDiv.prototype.dynamicAddsBlock=function(){var dynamicAddsBlock,push_image_button,_this=this;dynamicAddsBlock=this.make('div',{"class":'dynamic-adds'});dynamicAddsBlock.appendChild(this.make('label',{},'Add image'));this.image_url_input=this.make('input',{type:'text',placeholder:"http://"});dynamicAddsBlock.appendChild(this.image_url_input);push_image_button=this.make('button',{},'+');dynamicAddsBlock.appendChild(push_image_button);$o(this.image_url_input).bind('keypress',function(e){if(e.keyCode===13){return _this.pushImage();}});$o(push_image_button).bind('click',function(e){return _this.pushImage();});return dynamicAddsBlock;};ImagesManagementDiv.prototype.pushImage=function(){OverlayMe.dyn_manager.addImage(this.image_url_input.value);return this.image_url_input.value='';};ImagesManagementDiv.prototype.checkAllbox=function(){var _this=this;this.checkAllBox=this.make('input',{type:"checkbox","class":'check-all'});$o(this.checkAllBox).bind('change',function(event){return _this.checkAll();});return this.checkAllBox;};ImagesManagementDiv.prototype.checkAll=function(){var checkbox,checkbox_state,_i,_len,_ref;checkbox_state=this.checkAllBox.checked;_ref=$o('.overlay-image-block input[type=checkbox]');for(_i=0,_len=_ref.length;_i<_len;_i++){checkbox=_ref[_i];if(checkbox.checked!==checkbox_state){$o(checkbox).trigger('click');}}
|
740
|
+
return this.saveState();};ImagesManagementDiv.prototype.saveState=function(){};ImagesManagementDiv.prototype.render=function(){return this.el;};return ImagesManagementDiv;})(Backbone.View);}).call(this);(function(){var overlay_panel;if(OverlayMe.mustLoad()){overlay_panel=new OverlayMe.MenuItem({id:"overlay_panel",title:"Overlays"});overlay_panel.append(new OverlayMe.Overlays.ContentDivManagementBlock().render());OverlayMe.images_management_div=new OverlayMe.Overlays.ImagesManagementDiv();overlay_panel.append(OverlayMe.images_management_div.render());OverlayMe.menu.append(overlay_panel.render());$o(window).bind('mousemove',function(event){return $o(window).trigger('mymousemove',event);});OverlayMe.dyn_manager=new OverlayMe.Overlays.DynamicManager();OverlayMe.dyn_manager.loadAll();OverlayMe.loadDefaultImage=function(){if(OverlayMe.dyn_manager.isEmpty()){return OverlayMe.dyn_manager.addImage('https://a248.e.akamai.net/assets.github.com/images/modules/about_page/octocat.png');}};$o.ajax({url:'/overlay_images',dataType:'json',success:function(data){if(data.length===0){return OverlayMe.loadDefaultImage();}else{return $o.each(data,function(index,img_path){return OverlayMe.images_management_div.append(new OverlayMe.Overlays.Image(img_path).render());});}},error:function(){return OverlayMe.loadDefaultImage();}});}}).call(this);(function(){window.overlay_me_loaded=true;}).call(this);
|