[TemporaryStorage] add files required for SDK build
[samples/web/TemporaryStorage.git] / tizen-web-ui-fw / latest / js / tizen-web-ui-fw.min.js
1 /*
2 This software is licensed under the MIT license (as defined
3 by the OSI at http://www.opensource.org/licenses/mit-license.php), except for
4 following files:
5     * src/js/jquery.mobile.tizen.pinch.js.
6     * src/js/widgets/jquery.mobile.tizen.gallery3d.js
7
8 ****************************************************************************
9 Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd.
10 Copyright (C) 2011 by Intel Corporation Ltd.
11
12 Permission is hereby granted, free of charge, to any person obtaining a copy
13 of this software and associated documentation files (the "Software"), to deal
14 in the Software without restriction, including without limitation the rights
15 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16 copies of the Software, and to permit persons to whom the Software is
17 furnished to do so, subject to the following conditions:
18
19 The above copyright notice and this permission notice shall be included in
20 all copies or substantial portions of the Software.
21
22 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
28 THE SOFTWARE.
29 ****************************************************************************
30
31 The following files are licensed under Flora license.
32     * src/js/jquery.mobile.tizen.pinch.js.
33     * src/js/widgets/jquery.mobile.tizen.gallery3d.js
34
35 ****************************************************************************
36 Flora License
37
38 Version 1.1, April, 2013
39
40 http://floralicense.org/license/
41
42 TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
43
44 1. Definitions.
45
46 "License" shall mean the terms and conditions for use, reproduction,
47 and distribution as defined by Sections 1 through 9 of this document.
48
49 "Licensor" shall mean the copyright owner or entity authorized by
50 the copyright owner that is granting the License.
51
52 "Legal Entity" shall mean the union of the acting entity and
53 all other entities that control, are controlled by, or are
54 under common control with that entity. For the purposes of
55 this definition, "control" means (i) the power, direct or indirect,
56 to cause the direction or management of such entity,
57 whether by contract or otherwise, or (ii) ownership of fifty percent (50%)
58 or more of the outstanding shares, or (iii) beneficial ownership of
59 such entity.
60
61 "You" (or "Your") shall mean an individual or Legal Entity
62 exercising permissions granted by this License.
63
64 "Source" form shall mean the preferred form for making modifications,
65 including but not limited to software source code, documentation source,
66 and configuration files.
67
68 "Object" form shall mean any form resulting from mechanical
69 transformation or translation of a Source form, including but
70 not limited to compiled object code, generated documentation,
71 and conversions to other media types.
72
73 "Work" shall mean the work of authorship, whether in Source or Object form,
74 made available under the License, as indicated by a copyright notice
75 that is included in or attached to the work (an example is provided
76 in the Appendix below).
77
78 "Derivative Works" shall mean any work, whether in Source or Object form,
79 that is based on (or derived from) the Work and for which the editorial
80 revisions, annotations, elaborations, or other modifications represent,
81 as a whole, an original work of authorship. For the purposes of this License,
82 Derivative Works shall not include works that remain separable from,
83 or merely link (or bind by name) to the interfaces of, the Work and
84 Derivative Works thereof.
85
86 "Contribution" shall mean any work of authorship, including the original
87 version of the Work and any modifications or additions to that Work or
88 Derivative Works thereof, that is intentionally submitted to Licensor
89 for inclusion in the Work by the copyright owner or by an individual or
90 Legal Entity authorized to submit on behalf of the copyright owner.
91 For the purposes of this definition, "submitted" means any form of
92 electronic, verbal, or written communication sent to the Licensor or
93 its representatives, including but not limited to communication on
94 electronic mailing lists, source code control systems, and issue
95 tracking systems that are managed by, or on behalf of, the Licensor
96 for the purpose of discussing and improving the Work, but excluding
97 communication that is conspicuously marked or otherwise designated
98 in writing by the copyright owner as "Not a Contribution."
99
100 "Contributor" shall mean Licensor and any individual or Legal Entity
101 on behalf of whom a Contribution has been received by Licensor and
102 subsequently incorporated within the Work.
103
104 "Tizen Certified Platform" shall mean a software platform that complies
105 with the standards set forth in the Tizen Compliance Specification
106 and passes the Tizen Compliance Tests as defined from time to time
107 by the Tizen Technical Steering Group and certified by the Tizen
108 Association or its designated agent.
109
110 2. Grant of Copyright License.  Subject to the terms and conditions of
111 this License, each Contributor hereby grants to You a perpetual,
112 worldwide, non-exclusive, no-charge, royalty-free, irrevocable
113 copyright license to reproduce, prepare Derivative Works of,
114 publicly display, publicly perform, sublicense, and distribute the
115 Work and such Derivative Works in Source or Object form.
116
117 3. Grant of Patent License.  Subject to the terms and conditions of
118 this License, each Contributor hereby grants to You a perpetual,
119 worldwide, non-exclusive, no-charge, royalty-free, irrevocable
120 (except as stated in this section) patent license to make, have made,
121 use, offer to sell, sell, import, and otherwise transfer the Work
122 solely as incorporated into a Tizen Certified Platform, where such
123 license applies only to those patent claims licensable by such
124 Contributor that are necessarily infringed by their Contribution(s)
125 alone or by combination of their Contribution(s) with the Work solely
126 as incorporated into a Tizen Certified Platform to which such
127 Contribution(s) was submitted. If You institute patent litigation
128 against any entity (including a cross-claim or counterclaim
129 in a lawsuit) alleging that the Work or a Contribution incorporated
130 within the Work constitutes direct or contributory patent infringement,
131 then any patent licenses granted to You under this License for that
132 Work shall terminate as of the date such litigation is filed.
133
134 4. Redistribution.  You may reproduce and distribute copies of the
135 Work or Derivative Works thereof pursuant to the copyright license
136 above, in any medium, with or without modifications, and in Source or
137 Object form, provided that You meet the following conditions:
138
139   1. You must give any other recipients of the Work or Derivative Works
140      a copy of this License; and
141   2. You must cause any modified files to carry prominent notices stating
142      that You changed the files; and
143   3. You must retain, in the Source form of any Derivative Works that
144      You distribute, all copyright, patent, trademark, and attribution
145      notices from the Source form of the Work, excluding those notices
146      that do not pertain to any part of the Derivative Works; and
147   4. If the Work includes a "NOTICE" text file as part of its distribution,
148      then any Derivative Works that You distribute must include a readable
149      copy of the attribution notices contained within such NOTICE file,
150      excluding those notices that do not pertain to any part of
151      the Derivative Works, in at least one of the following places:
152      within a NOTICE text file distributed as part of the Derivative Works;
153      within the Source form or documentation, if provided along with the
154      Derivative Works; or, within a display generated by the Derivative Works,
155      if and wherever such third-party notices normally appear.
156      The contents of the NOTICE file are for informational purposes only
157      and do not modify the License.
158
159 You may add Your own attribution notices within Derivative Works
160 that You distribute, alongside or as an addendum to the NOTICE text
161 from the Work, provided that such additional attribution notices
162 cannot be construed as modifying the License. You may add Your own
163 copyright statement to Your modifications and may provide additional or
164 different license terms and conditions for use, reproduction, or
165 distribution of Your modifications, or for any such Derivative Works
166 as a whole, provided Your use, reproduction, and distribution of
167 the Work otherwise complies with the conditions stated in this License.
168
169 5. Submission of Contributions. Unless You explicitly state otherwise,
170 any Contribution intentionally submitted for inclusion in the Work
171 by You to the Licensor shall be under the terms and conditions of
172 this License, without any additional terms or conditions.
173 Notwithstanding the above, nothing herein shall supersede or modify
174 the terms of any separate license agreement you may have executed
175 with Licensor regarding such Contributions.
176
177 6. Trademarks.  This License does not grant permission to use the trade
178 names, trademarks, service marks, or product names of the Licensor,
179 except as required for reasonable and customary use in describing the
180 origin of the Work and reproducing the content of the NOTICE file.
181
182 7. Disclaimer of Warranty. Unless required by applicable law or
183 agreed to in writing, Licensor provides the Work (and each
184 Contributor provides its Contributions) on an "AS IS" BASIS,
185 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
186 implied, including, without limitation, any warranties or conditions
187 of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
188 PARTICULAR PURPOSE. You are solely responsible for determining the
189 appropriateness of using or redistributing the Work and assume any
190 risks associated with Your exercise of permissions under this License.
191
192 8. Limitation of Liability. In no event and under no legal theory,
193 whether in tort (including negligence), contract, or otherwise,
194 unless required by applicable law (such as deliberate and grossly
195 negligent acts) or agreed to in writing, shall any Contributor be
196 liable to You for damages, including any direct, indirect, special,
197 incidental, or consequential damages of any character arising as a
198 result of this License or out of the use or inability to use the
199 Work (including but not limited to damages for loss of goodwill,
200 work stoppage, computer failure or malfunction, or any and all
201 other commercial damages or losses), even if such Contributor
202 has been advised of the possibility of such damages.
203
204 9. Accepting Warranty or Additional Liability. While redistributing
205 the Work or Derivative Works thereof, You may choose to offer,
206 and charge a fee for, acceptance of support, warranty, indemnity,
207 or other liability obligations and/or rights consistent with this
208 License. However, in accepting such obligations, You may act only
209 on Your own behalf and on Your sole responsibility, not on behalf
210 of any other Contributor, and only if You agree to indemnify,
211 defend, and hold each Contributor harmless for any liability
212 incurred by, or claims asserted against, such Contributor by reason
213 of your accepting any such warranty or additional liability.
214
215 END OF TERMS AND CONDITIONS
216
217 APPENDIX: How to apply the Flora License to your work
218
219 To apply the Flora License to your work, attach the following
220 boilerplate notice, with the fields enclosed by brackets "[]"
221 replaced with your own identifying information. (Don't include
222 the brackets!) The text should be enclosed in the appropriate
223 comment syntax for the file format. We also recommend that a
224 file or class name and description of purpose be included on the
225 same "printed page" as the copyright notice for easier
226 identification within third-party archives.
227
228    Copyright [yyyy] [name of copyright owner]
229
230    Licensed under the Flora License, Version 1.1 (the "License");
231    you may not use this file except in compliance with the License.
232    You may obtain a copy of the License at
233
234        http://floralicense.org/license/
235
236    Unless required by applicable law or agreed to in writing, software
237    distributed under the License is distributed on an "AS IS" BASIS,
238    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
239    See the License for the specific language governing permissions and
240    limitations under the License.
241
242 ****************************************************************************
243
244
245
246 This software incorporates software from other sources, including:
247
248 widgets/jquery.mobile.groupindex/
249         initial version taken from
250         git clone https://github.com/jquery/jquery-mobile.git
251         commit a197e17500ed9f4994f532ab384b0b45b414a1ea
252         including theme files (removed php files which required some changes), demo html, js, and also the
253         jquery.mobile.scrollview.{js/css} in the common directories (already copied as part of datetimepicker).
254
255 jQuery UI (http://jqueryui.com/) [MIT license]
256
257 jQuery Mobile (http://jquerymobile.com/) [MIT license]
258
259 jQuery (http://jquery.com/) [MIT license]
260
261 (parts of) Underscore (http://documentcloud.github.com/underscore/) [MIT license]
262
263 Globalize (http://github.com/jquery/globalize/) [MIT license]
264
265 glMatrix 1.3.7 (https://github.com/toji/gl-matrix) [https://github.com/toji/gl-matrix/blob/master/LICENSE.md]
266 */
267 function range(a,b,c){var d=[],e,f,g,h=c||1,i=!1;!isNaN(a)&&!isNaN(b)?(e=a,f=b):isNaN(a)&&isNaN(b)?(i=!0,e=a.charCodeAt(0),f=b.charCodeAt(0)):(e=isNaN(a)?0:a,f=isNaN(b)?0:b),g=e>f?!1:!0;if(g)while(e<=f)d.push(i?String.fromCharCode(e):e),e+=h;else while(e>=f)d.push(i?String.fromCharCode(e):e),e-=h;return d}var ensureNS=function(){var a={};return function(c){var d=c.split(".").reverse(),e="",f="",g="",h=d.length;while(--h>=0)g=d[h],e=e+(e.length>0?".":"")+g,a[e]||(a[e]=!0,f+="!window."+e+" && (window."+e+" = {});\n");f.length&&(new Function(f))()}}();(function(a,b){a.webgl={},a.webgl.shader={_vertexShader:null,_fragmentShader:null,deleteShaders:function(a){a.deleteShader(this._vertexShader),a.deleteShader(this._fragmentShader)},addShaderProgram:function(a,b,c,d){var e,f={},g={};return d?(f=this.loadShaderFile(b),g=this.loadShaderFile(c)):(f.source=b,g.source=c),this._vertexShader=this.getShader(a,a.VERTEX_SHADER,f),this._fragmentShader=this.getShader(a,a.FRAGMENT_SHADER,g),e=a.createProgram(),a.attachShader(e,this._vertexShader),a.attachShader(e,this._fragmentShader),a.linkProgram(e),a.getProgramParameter(e,a.LINK_STATUS)||window.alert("Could not initialize Shaders!"),e},loadShaderFile:function(b){var c=null;return a.ajax({async:!1,url:b,success:function(a){c={source:a}}}),c},getShader:function(a,b,c){var d;return!a||!b||!c?null:(d=a.createShader(b),a.shaderSource(d,c.source),a.compileShader(d),a.getShaderParameter(d,a.COMPILE_STATUS)?d:(window.alert(a.getShaderInfoLog(d)),a.deleteShader(d),null))}},a.webgl.buffer={attribBufferData:function(a,b){var c=a.createBuffer();return a.bindBuffer(a.ARRAY_BUFFER,c),a.bufferData(a.ARRAY_BUFFER,b,a.STATIC_DRAW),a.bindBuffer(a.ARRAY_BUFFER,null),c}}})(jQuery),function(a,b,c){var d=Math.PI/2,e=.001,f={},g=b.vec3,h=function(a,b){var c=[b[0]-a[0],b[1]-a[1],b[2]-a[2]],d=Math.sqrt(c[0]*c[0]+c[1]*c[1]+c[2]*c[2]);return d};f.base=function(){},f.base.prototype={points:[],step:e,length:0,levels:[],init:function(a){},calculateLevel:function(a){},calculateTotalLength:function(){},getPosition:function(a){},getPercent:function(a,b){},getAngle:function(a){}},f.bezier2d=function(){},f.bezier2d.prototype=a.extend(!0,{},f.base.prototype,{init:function(a){this.points=a.points,this.step=a.step||e,this.length=this.calculateTotalLength(),this.levels=this.calculateLevel(a.maxLevel)||[]},calculateLevel:function(a){var b=this.length,c=b/a,d=[],e;if(!a)return null;for(e=0;e<a;e+=1)d[a-e]=this.getPercent(0,c*e);return d},calculateTotalLength:function(){var a=this.step,b=this.getPosition(0),c=b,d=0,e;for(e=a;e<=1;e+=a)b=this.getPosition(e),d+=h(c,b),c=b;return d},getPosition:function(a){var b=this.points,c=function(a,b,c,d,e){return Math.pow(1-e,3)*a+3*e*Math.pow(1-e,2)*b+3*Math.pow(e,2)*(1-e)*c+Math.pow(e,3)*d},d=[c(b[0][0],b[1][0],b[2][0],b[3][0],a),c(b[0][2],b[1][2],b[2][2],b[3][2],a)];return[d[0],0,d[1]]},getPercent:function(a,b){var c=this.step,d=this.getPosition(a=a||0),e=d,f=a+b,g=0,i;for(i=a+c;i<=1;i+=c){d=this.getPosition(i),g+=h(e,d);if(g>=f)return i;e=d}return 1},getAngle:function(a){var b=this.points,c=function(a,b,c,d,e){return 3*e*e*(-a+3*b-3*c+d)+6*e*(a-2*b+c)+3*(-a+b)},e=c(b[0][0],b[1][0],b[2][0],b[3][0],a),f=c(b[0][2],b[1][2],b[2][2],b[3][2],a);return Math.atan2(e,f)-d}}),f.bspline=function(){},f.bspline.prototype=a.extend(!0,{},f.base.prototype,{_degree:3,_numberOfControls:0,_knotVectors:[],_numberOfKnots:0,init:function(a){this.points=a.points,this.step=a.step||e,this._numberOfPoints=this.points.length-1,this._numberOfKnots=this._numberOfPoints+this._degree+1;var b=1/(this._numberOfKnots-2*this._degree),c=b,d=0;while(d<=this._numberOfKnots)d<=this._degree?this._knotVectors.push(0):d<this._numberOfKnots-this._degree+1?(this._knotVectors.push(c),c+=b):this._knotVectors.push(1),d+=1;this.length=this.calculateTotalLength(),this.levels=this.calculateLevel(a.maxLevel)||[]},_Np:function(a,b,c){var d=this._knotVectors,e=0,f=0,g=0,h=function(a,b){return d[b]<=a&&a<d[b+1]?1:0};return c===1?(e=h(a,b),f=h(a,b+1)):(e=this._Np(a,b,c-1),f=this._Np(a,b+1,c-1)),g=d[b+c]-d[b],e*=g!==0?(a-d[b])/g:0,g=d[b+c+1]-d[b+1],f*=g!==0?(d[b+c+1]-a)/g:0,e+f},calculateLevel:function(a){var b=this.length,c=b/a,d=[],e;if(!a)return null;for(e=0;e<a;e+=1)d[a-e]=this.getPercent(0,c*e);return d},calculateTotalLength:function(){var a=this.step,b=this.getPosition(0),c=b,d=0,e;for(e=a;e<=1;e+=a)b=this.getPosition(e),d+=h(c,b),c=b;return d},getPosition:function(a){var b=[],c,d,e;a=a.toFixed(4);for(d=0;d<3;d+=1){e=0;for(c=0;c<=this._numberOfPoints;c+=1)e+=this.points[c][d]*this._Np(a,c,this._degree);b[d]=e}return b},getPercent:function(a,b){var c=this.step,d=this.getPosition(a=a||0),e=d,f=a+b,g=0,i;for(i=a+c;i<=1;i+=c){d=this.getPosition(i),g+=h(e,d);if(g>=f)return i;e=d}return 1},getAngle:function(a){var b=this.getPosition(a),c=this.getPosition(a+.001),d=g.normalize(g.direction(b,c)),e=g.dot(d,[1,0,0]);return Math.acos(e)+Math.PI}}),a.motionpath=function(a,b){var c=new f[a];return c.init(b),c}}(jQuery,window),function(a,b){ensureNS("jQuery.mobile.tizen"),jQuery.extend(jQuery.mobile.tizen,{_widgetPrototypes:{},loadPrototype:function(c,d){function h(a){return a.replace(/\$\{FRAMEWORK_ROOT\}/g,g)}function i(a,b){var c;for(var d in a)typeof a[d]=="string"?(c=a[d],a[d]=b.find(a[d]),c.substring(0,1)==="#"&&a[d].removeAttr("id")):typeof a[d]=="object"&&(a[d]=i(a[d],b));return a}var e=b,f=a("script[data-framework-version][data-framework-root][data-framework-theme]"),g=f.attr("data-framework-root")+"/"+f.attr("data-framework-version")+"/";if(typeof c=="string"){e=a.mobile.tizen._widgetPrototypes[c];if(e===b){var j=g+"proto-html"+"/"+f.attr("data-framework-theme");a.ajax({url:j+"/"+c+".prototype.html",async:!1,dataType:"html"}).success(function(b,d,f){a.mobile.tizen._widgetPrototypes[c]=a("<div>").html(h(b)),e=a.mobile.tizen._widgetPrototypes[c].clone()})}}else c.key!==b&&(e=a.mobile.tizen._widgetPrototypes[c.key]),e===b?c.proto!==b&&(e=a("<div>").html(h(c.proto)),c.key!==b&&(a.mobile.tizen._widgetPrototypes[c.key]=e.clone())):e=e.clone();return e!=b&&d!=b&&(e=i(d,e)),e}})}(jQuery),function(a,b,c,d){function g(){if(f)return;e=c.createElement("canvas"),f=e.getContext("2d")}function h(a){var c=b.FileError,d="";switch(a.code){case c.QUOTA_EXCEEDED_ERR:d="QUOTA_EXCEEDED_ERR";break;case c.NOT_FOUND_ERR:d="NOT_FOUND_ERR";break;case c.SECURITY_ERR:d="SECURITY_ERR";break;case c.INVALID_MODIFICATION_ERR:d="INVALID_MODIFICATION_ERR";break;case c.INVALID_STATE_ERR:d="INVALID_STATE_ERR";break;default:d="Unknown Error"}return d}function i(a){var b=a.replace(/\//gi,"_");return b}function j(a,b,c,d,e){var f=0,g=0,h=0,i=0,j=a/c,k=b/d,l=Math.max(j,k);return e?(f=c,g=d):(l>1?(f=a/l,g=b/l):(f=a,g=b),h=(c-f)/2,i=(d-g)/2),{w:f,h:g,x:h,y:i}}function k(a,b,c,d){var h,i;return g(),e.width=b,e.height=c,h=j(a.width,a.height,b,c,d),f.fillStyle="#000000",f.fillRect(0,0,b,c),f.drawImage(a,h.x,h.y,h.w,h.h),i=e.toDataURL(),i}var e,f;a.imageloader={_grantedBytes:1048576,getThumbnail:function(a,b){function e(a){var c=h(a);b&&b(c==="NOT_FOUND_ERR"?c:null)}var c,d;c=i(a);try{d=localStorage.getItem(c),b&&b(d===null?"NOT_FOUND_ERR":d)}catch(f){b&&b(f.type==="non_object_property_load"?"NOT_FOUND_ERR":null)}},setThumbnail:function(a,b,c,d,e){function l(a){var c=h(a);b&&b(c==="NOT_FOUND_ERR"?c:null)}var f,g,j;c=c||128,d=d||128,e=e||!0,f=new Image,f.onload=function(){g=i(a),j=k(this,c,d,e);try{localStorage.setItem(g,j),b&&b(j)}catch(f){b&&b(f.type==="non_object_property_load"?"NOT_FOUND_ERR":null)}},f.src=a},removeThumbnail:function(a){function c(a){h(a)}var b;b=i(a);try{localStorage.removeItem(b)}catch(d){throw d}}}}(jQuery,window,document),function(a,b,c){a.widget("tizen.gallery",a.mobile.widget,{options:{flicking:!1,duration:500},dragging:!1,moving:!1,max_width:0,max_height:0,org_x:0,org_time:null,cur_img:null,prev_img:null,next_img:null,images:[],images_hold:[],index:0,align_type:null,direction:1,container:null,orientationEventFire:!1,_resize:function(a){var b=this.images[a],c=this.images[a].width(),d=this.images[a].height(),e=0,f,g=this.max_width-e,h=this.max_height-e;f=d/c,c>g&&(b.width(g),b.height(g*f)),d=b.height(),d>h&&(b.height(h),b.width(h/f))},_align:function(a,b){var c=this.images[a],d=0;if(!b)return;if(!b.length)return;this.align_type=="middle"?d=(this.max_height-c.height())/2:this.align_type=="bottom"?d=this.max_height-c.height():d=0,b.css("top",d+"px")},_attach:function(a,b){var d=this,e=function(){d._resize(a),d._align(a,b)},f=function(){if(d.images[a]===c)return;if(!d.images[a].height()){setTimeout(f,10);return}e()};if(!b)return;if(!b.length)return;if(a<0)return;if(!this.images.length)return;if(a>=this.images.length)return;b.css("display","block"),b.css("visibility","hidden"),b.append(this.images[a]),f()},_detach:function(a,b){if(!b)return;if(!b.length)return;if(a<0)return;if(a>=this.images.length)return;b.css("display","none"),this.images[a].removeAttr("style"),this.images[a].detach()},_detach_all:function(){var a;for(a=0;a<this.images.length;a++)this.images[a].detach()},_drag:function(a){var b,c;if(!this.dragging)return;if(this.options.flicking===!1){b=this.org_x-a;if(b<0&&!this.prev_img.length)return;if(b>0&&!this.next_img.length)return}c=a-this.org_x,this._moveLeft(this.cur_img,c+"px"),this.next_img.length&&this._moveLeft(this.next_img,c+this.window_width+"px"),this.prev_img.length&&this._moveLeft(this.prev_img,c-this.window_width+"px")},_move:function(a){var b=this.org_x-a,c=0,d,e,f;if(b==0)return;b>0?c=b<this.max_width*.45?0:1:c=-b<this.max_width*.45?0:1,c||(d=Date.now()-this.org_time,Math.abs(b)/d>1&&(c=1)),c&&(b>0&&this.next_img.length?(this._detach(this.index-1,this.prev_img),this.prev_img=this.cur_img,this.cur_img=this.next_img,this.next_img=this.next_img.next(),this.index++,this.next_img.length&&(this._moveLeft(this.next_img,this.window_width+"px"),this._attach(this.index+1,this.next_img)),this.direction=1):b<0&&this.prev_img.length&&(this._detach(this.index+1,this.next_img),this.next_img=this.cur_img,this.cur_img=this.prev_img,this.prev_img=this.prev_img.prev(),this.index--,this.prev_img.length&&(this._moveLeft(this.prev_img,-this.window_width+"px"),this._attach(this.index-1,this.prev_img)),this.direction=-1)),e=this.options.duration,f=this,this.moving=!0,setTimeout(function(){f.moving=!1},e-25),this._moveLeft(this.cur_img,"0px",e),this.next_img.length&&this._moveLeft(this.next_img,this.window_width+"px",e),this.prev_img.length&&this._moveLeft(this.prev_img,-this.window_width+"px",e)},_add_event:function(){var a=this,b;this.container.bind("vmousemove",function(b){b.preventDefault();if(a.moving)return;if(!a.dragging)return;a._drag(b.pageX)}),this.container.bind("vmousedown",function(b){b.preventDefault();if(a.moving)return;a.dragging=!0,a.org_x=b.pageX,a.org_time=Date.now()}),this.container.bind("vmouseup",function(b){if(a.moving)return;a.dragging=!1,a._move(b.pageX)}),this.container.bind("vmouseout",function(b){if(a.moving)return;if(!a.dragging)return;if(b.pageX<20||b.pageX>a.max_width-20)a._move(b.pageX),a.dragging=!1})},_del_event:function(){this.container.unbind("vmousemove"),this.container.unbind("vmousedown"),this.container.unbind("vmouseup"),this.container.unbind("vmouseout")},_setTranslateposition:function(b,c){var d,e=null,f=this;return a.support.cssTransform3d?d="translate3d("+c+", 0px, 0px)":d="translate("+c+", 0px)",e={"-moz-transform":d,"-webkit-transform":d,"-ms-transform":d,"-o-transform":d,transform:d},b.css(e),b},_hidePrevNext:function(){var a=this;a.next_img&&a.next_img.css("visibility","hidden"),a.prev_img&&a.prev_img.css("visibility","hidden")},_hideCur:function(){var a=this;a.cur_img&&a.cur_img.css("visibility","hidden")},_moveLeft:function(b,d,e){var f,g="",h=null,i=this;return a.support.cssTransform3d?f="translate3d("+d+", 0px, 0px)":f="translate("+d+", 0px)",e!==c&&(g="-webkit-transform "+e/1e3+"s ease"),h={"-moz-transform":f,"-webkit-transform":f,"-ms-transform":f,"-o-transform":f,transform:f},g!==""&&(h["-webkit-transition"]=g,d=="0px"?b.one("webkitTransitionEnd",i._hidePrevNext):b.one("webkitTransitionEnd",i._hideCur)),d=="0px"&&b.css("visibility","visible"),b.css(h),b},_show:function(){this.window_width=a(b).width(),this.max_width=this._get_width(),this.max_height=this._get_height(),this.container.css("height",this.max_height),this.cur_img=a("div").find(".ui-gallery-bg:eq("+this.index+")"),this.prev_img=this.cur_img.prev(),this.next_img=this.cur_img.next(),this._attach(this.index-1,this.prev_img),this._attach(this.index,this.cur_img),this._attach(this.index+1,this.next_img),this.cur_img.css("visibility","visible"),this.prev_img.length&&this._setTranslateposition(this.prev_img,-this.window_width+"px"),this._moveLeft(this.cur_img,"0px"),this.next_img.length&&this._setTranslateposition(this.next_img,this.window_width+"px")},show:function(){if(!this.images.length)return;this._show(),this._add_event()},_hide:function(){this._detach(this.index-1,this.prev_img),this._detach(this.index,this.cur_img),this._detach(this.index+1,this.next_img)},hide:function(){this._hide(),this._del_event()},_get_width:function(){return a(this.element).width()},_get_height:function(){var c=a(this.element).parentsUntil("ui-page"),d=c.children(".ui-content"),e=c.children(".ui-header").outerHeight()||0,f=c.children(".ui-footer").outerHeight()||0,g=parseFloat(d.css("padding-top"))+parseFloat(d.css("padding-bottom")),h=a(b).height()-e-f-g;return h},_create:function(){var c,d=this,e,f=0;a(this.element).wrapInner('<div class="ui-gallery"></div>'),a(this.element).find("img").wrap('<div class="ui-gallery-bg"></div>'),this.container=a(this.element).find(".ui-gallery"),c=a("div").find(".ui-gallery-bg:first");while(c.length)this.images[f]=c.find("img"),c=c.next(),f++;this._detach_all(),e=parseInt(a(this.element).jqmData("index"),10),e||(e=0),e<0&&(e=0),e>=this.images.length&&(e=this.images.length-1),this.index=e,this.align_type=a(this.element).jqmData("vertical-align"),a.extend(this,{_globalHandlers:[{src:a(b),handler:{orientationchange:a.proxy(this,"_orientationHandler"),resize:a.proxy(this,"_resizeHandler")}}]}),a.each(this._globalHandlers,function(a,b){b.src.bind(b.handler)})},_update:function(){var b,c,d;while(this.images_hold.length)b=this.images_hold.shift(),c=a('<div class="ui-gallery-bg"></div>'),d=a('<img src="'+b+'"></div>'),c.append(d),this.container.append(c),this.images.push(d);this._detach_all()},_resizeHandler:function(){var a=this;a.orientationEventFire&&(a.refresh(),a.orientationEventFire=!1)},_orientationHandler:function(){var a=this;a.refresh(),a.orientationEventFire=!0},refresh:function(a){return this._update(),this._hide(),a===c&&(a=this.index),a<0&&(a=0),a>=this.images.length&&(a=this.images.length-1),this.index=a,this._show(),this.index},add:function(a){this.images_hold.push(a)},remove:function(b){var d;b===c&&(b=this.index);if(b<0||b>=this.images.length)return;b==this.index?(d=this.cur_img,this.index==0?this.direction=1:this.index==this.images.length-1&&(this.direction=-1),this.direction<0?(this.cur_img=this.prev_img,this.prev_img=this.prev_img.prev(),this.prev_img.length&&(this._moveLeft(this.prev_img,-this.window_width+"px"),this._attach(b-2,this.prev_img)),this.index--):(this.cur_img=this.next_img,this.next_img=this.next_img.next(),this.next_img.length&&(this._moveLeft(this.next_img,this.window_width+"px"),this._attach(b+2,this.next_img))),this._moveLeft(this.cur_img,"0px",this.options.duration)):b==this.index-1?(d=this.prev_img,this.prev_img=this.prev_img.prev(),this.prev_img.length&&(this._moveLeft(this.prev_img,-this.window_width+"px"),this._attach(b-1,this.prev_img)),this.index--):b==this.index+1?(d=this.next_img,this.next_img=this.next_img.next(),this.next_img.length&&(this._moveLeft(this.next_img,this.window_width+"px"),this._attach(b+1,this.next_img))):d=a("div").find(".ui-gallery-bg:eq("+b+")"),this.images.splice(b,1),d.detach()},empty:function(){this.images.splice(0,this.images.length),this.container.find(".ui-gallery-bg").detach()},length:function(){return this.images.length},value:function(a){if(a===c)return this.index;this.refresh(a)},destory:function(){a(b).unbind("resize",this._resizeHandler),a(b).unbind("orientationchange",this._orientationHandler)}}),a(document).bind("pagecreate create",function(b){a(b.target).find(":jqmData(role='gallery')").gallery()}),a(document).bind("pageshow",function(b){a(b.target).find(":jqmData(role='gallery')").gallery("show")}),a(document).bind("pagebeforehide",function(b){a(b.target).find(":jqmData(role='gallery')").gallery("hide")})}(jQuery,this),function(a,b){a(document).bind("pagecreate create",function(b){a(":jqmData(role='label')",b.target).not(":jqmData(role='none'), :jqmData(role='nojs')").each(function(){a(this).addClass("jquery-mobile-ui-label").html(a("<span>",{"class":"jquery-mobile-ui-label-text"}).text(a(this).text()))})})}(jQuery),function(a,b){a.widget("tizen.listdivider",a.mobile.widget,{options:{initSelector:":jqmData(role='list-divider')",folded:!1,listDividerLine:!0},_create:function(){var c=this.element,d=!0,e,f=!0,g=c.attr("data-style");c.data("line")===!1&&(this.options.listDividerLine=!1),c.data("folded")===!0&&(this.options.folded=!0);if(g==b||g==="normal"||g==="check")this.options.folded?c.buttonMarkup():c.wrapInner("<span class='ui-btn-text'></span>"),this.options.listDividerLine&&(e="<span class='ui-divider-normal-line'></span>",this.options.folded?a(e).appendTo(c.children(".ui-btn-inner")):a(e).appendTo(c));c.bind("vclick",function(a,b){})}}),a(document).bind("pagecreate create",function(b){a(a.tizen.listdivider.prototype.options.initSelector,b.target).listdivider()})}(jQuery),function(a,b,c,d){function e(){this.vertices=[-1,-1,0,1,-1,0,1,1,0,-1,1,0],this.textureCoords=[1,0,0,0,0,1,1,1],this.normalVectors=[0,0,1,0,0,1,0,0,1,0,0,1],this.texture=null,this.textureBuffer=null,this.textureBufferItemSize=0,this.mashOrder=[],this.mvMatrix=null,this.level=-1,this.targetLevel=0,this.drawable=!1,this.image=null,this.imageID=0}var f=!1,g={},h,i,j,k,l=function(){if(f)return;c.initGlMatrix(g),h=["attribute vec3 aVertexPosition;","attribute vec2 aTextureCoord;","attribute vec3 aVertexNormal;","uniform mat4 uMoveMatrix;","uniform mat4 uPerspectiveMatrix;","uniform mat3 nNormalMatrix;","uniform vec3 uAmbientColor;","uniform vec3 uLightDirection;","uniform vec3 uDirectionColor;","uniform vec3 uLightDirection_first;","uniform vec3 uLightDirection_second;","varying vec2 vTextureCoord;","varying vec3 vLightWeight;","varying vec4 vFogWeight;","void main(void) {","\tvec4 v_Position = uMoveMatrix * vec4(aVertexPosition, 1.0);","\tgl_Position = uPerspectiveMatrix * v_Position;","\tvTextureCoord = aTextureCoord;","\tfloat fog = 1.0 - ((gl_Position.z + 1.5) / 60.0);","\tvFogWeight = clamp( vec4( fog, fog, fog, 1.0), 0.6, 1.0);","\tvec3 transNormalVector = nNormalMatrix * aVertexNormal;","\tfloat vLightWeightFirst = 0.0;","\tfloat vLightWeightSecond = max( dot(transNormalVector, uLightDirection_second), 0.0 );","\tvLightWeight = uAmbientColor + uDirectionColor * vLightWeightSecond;","}"].join("\n"),i=["precision mediump float;","varying vec2 vTextureCoord;","varying vec3 vLightWeight;","uniform sampler2D uSampler;","varying vec4 vFogWeight;","void main(void) {","\tvec4 TextureColor;","\tif ( vTextureCoord.s <= 0.01 || vTextureCoord.s >= 0.99 || vTextureCoord.t <= 0.01 || vTextureCoord.t >= 0.99 ) {","\t\tTextureColor = vec4(1.0, 1.0, 1.0, 0.5);","\t} else {","\t\tTextureColor = texture2D(uSampler, vec2(vTextureCoord.s, vTextureCoord.t));","\t}","\tTextureColor *= vFogWeight;","\tgl_FragColor = vec4(TextureColor.rgb * vLightWeight, TextureColor.a);","}"].join("\n"),j=typeof c.Float32Array!="undefined"?c.Float32Array:typeof c.WebGLFloatArray!="undefined"?c.WebGLFloatArray:Array,k=typeof c.Uint16Array!="undefined"?c.Uint16Array:Array,f=!0},m=function(a){return a*Math.PI/180},n=function(b){var c,d,e=["experimental-webgl","webkit-3d","webgl","moz-webgl"];for(d=0;d<e.length;d+=1)try{c=b.getContext(e[d]);if(c)break}catch(f){a(b).html("Unfortunately, there's a WebGL compatibility problem. </br> You may want to check your system settings.");return}return c},o=function(a){var b=c.setTimeout(a,1e3/60);return b},p=function(a){c.clearTimeout(a)};a.widget("tizen.gallery3d",a.mobile.widget,{options:{thumbnailCache:!1},_MAX_ITEM_COUNT:28,_ANIMATION_END:999,_DURATION_DEFAULT:300,_DURATION_FIRST:1600,_VIEWPORT_WIDTH:1024,_VIEWPORT_HEIGHT:456,_DIRECTION_LEFT:-1,_DIRECTION_RIGHT:1,_gl:null,_shaderProgram:null,_positionBuffer:null,_textureCoordBuffer:null,_normalVectorBuffer:null,_nodes:null,_pMatrix:null,_animationID:0,_dragInterval:0,_startTime:0,_sumTime:0,_lightsPositionStack:[[0,0,-1],[-0.2,0,.7]],_path:null,_swipeThresholdOfBasetimeGap:a.support.touch?30:70,_swipeThresholdOfSensitivity:a.support.touch?2:10,_canvas:null,_imageList:[],_maxDrawLength:0,_firstImageNumber:0,_lastImageNumber:0,_create:function(){var b=this,c=b.element,e=b.options;l(),b._canvas=a("<canvas class='ui-gallery3d-canvas'></canvas>"),c.addClass("ui-gallery3d").append(b._canvas),b._addBehavier(),b._dragInterval=1e3/30,a.each(b.options,function(a,c){b.options[a]=d,b._setOption(a,c)})},destroy:function(){this._final(),a.mobile.widget.prototype.destroy.call(this)},_setOption:function(b,c){switch(b){case"thumbnailCache":typeof c=="string"?c=c==="true"?!0:!1:c=!!c,this._reset()}a.mobile.widget.prototype._setOption.call(this,b,c)},_init:function(b){var c=this,d=[[40,0,-48],[-12,0,-40],[24,0,-9],[-5,0,-5]],e;b=b||c._canvas;if(!b)return;c._gl=c._gl||c._initGL(b[0]);if(!c._gl)return;if(!c._imageList)return;c._shaderProgram=c._shaderProgram||c._initShader(c._gl);if(!c._shaderProgram)return;c._imageList.length>c._MAX_ITEM_COUNT&&(c._firstImageNumber=c._imageList.length-1,c._lastImageNumber=c._MAX_ITEM_COUNT-1),c._nodes=c._initBuffers(c._gl,c._shaderProgram),c._initTextures(c._gl,c._nodes),c._path=a.motionpath("bezier2d",{points:d,maxLevel:c._MAX_ITEM_COUNT});for(e=0;e<c._nodes.length;e+=1)c._path.levels[e]=c._path.levels[e+1]||0,c._nodes[e].level=e},_final:function(b){var c=this,d=c._gl;if(!d)return;c._stop(),b=b||c._canvas,a(c._nodes).each(function(a){var b=c._nodes[a];d.deleteTexture(b.texture),b.texture=null}),c._nodes=null,d.deleteBuffer(c._positionBuffer),c._positionBuffer=null,d.deleteBuffer(c._textureCoordBuffer),c._textureCoordBuffer=null,d.deleteBuffer(c._normalVectorBuffer),c._normalVectorBuffer=null,a.webgl.shader.deleteShaders(d),d.deleteProgram(c._shaderProgram),c._shaderProgram=null,c._gl=d=null},_addBehavier:function(){var b=this,c=b.element,d=b._canvas,e=a.support.touch?"touchstart":"mousedown",f=(a.support.touch?"touchmove":"mousemove")+".gallery3d",g=(a.support.touch?"touchend":"mouseup")+".gallery3d",h=(a.support.touch?"touchleave":"mouseout")+".gallery3d";d.on("webglcontextlost",function(a){a.preventDefault()}).on("webglcontextrestored",function(a){b._init()}).on(e,function(d){var e=0,i=0,j=20,k=[j],l=[j],m=0,n=0,o=!1,p=0;d.preventDefault(),d.stopPropagation();if(b._imageList.length<=1)return;b._stop(),i=a.support.touch?d.originalEvent.changedTouches[0].pageX:d.pageX,p=a.now();for(e=0;e<j;e+=1)k[e]=i,l[e]=a.now();m+=1,c.on(f,function(c){var d,e,f;c.preventDefault(),c.stopPropagation(),d=a.support.touch?c.originalEvent.changedTouches[0].pageX:c.pageX,e=i-d,k[m]=d,l[m]=a.now(),f=l[m]-p,m=(m+1)%j,Math.abs(e)>=10&&f>=b._dragInterval&&(o!==(e<0?b._DIRECTION_RIGHT:b._DIRECTION_LEFT)&&(n=0,o=e<0?b._DIRECTION_RIGHT:b._DIRECTION_LEFT),n+=Math.abs(e)/100,n>=1?(b._setPosition(b._ANIMATION_END,o),n=0):b._setPosition(n,o),b._drawScene(),i=d,p=a.now())}).on(g,function(d){var f=0,g=-1,h=0,p=0,q=0,r=0,s=0,t=0,u=0,v=!0,w;d.preventDefault(),d.stopPropagation(),f=a.now()-b._swipeThresholdOfBasetimeGap,s=a.support.touch?d.originalEvent.changedTouches[0].pageX:d.pageX,u=i-s,i=0;for(e=0;e<j;e+=1){h=(m+e)%j;if(l[h]>f){g=h;break}}g<0&&(v=!1);if(v){p=g;for(e=0;e<j;e+=1){p=(p-1+j)%j;if(l[p]<l[g])break}if(e===j||f<l[p])v=!1}v&&(q=(f-l[p])/(l[g]-l[p]),r=(1-q)*k[p]+q*k[g],Math.abs(r-s)<b._swipeThresholdOfSensitivity&&(r=s),t=parseInt((s-r)/(a.now()-f),10)),v&&t?(w=t<0?b._DIRECTION_LEFT:b._DIRECTION_RIGHT,b._run(w,Math.abs(t),n)):o!==0&&n&&b._animate(null,b._DURATION_DEFAULT*(1-n),o,0,n),c.unbind(".gallery3d")}).on(h,function(a){c.trigger(g)})})},_initGL:function(a){var b=this,c=g.mat4,d;return d=n(a),d?(d.enable(d.BLEND),d.blendFunc(d.SRC_ALPHA,d.ONE_MINUS_SRC_ALPHA),d.enable(d.DEPTH_TEST),d.depthFunc(d.LEQUAL),a.width=b._VIEWPORT_WIDTH,a.height=b._VIEWPORT_HEIGHT,d.viewportWidth=a.width,d.viewportHeight=a.height,d.viewport(0,0,d.viewportWidth,d.viewportHeight),b._pMatrix=c.create(),c.perspective(40,d.viewportWidth/d.viewportHeight,.1,1e4,b._pMatrix),d.clearColor(.15,.15,.15,1),d.clear(d.COLOR_BUFFER_BIT|d.DEPTH_BUFFER_BIT),d):null},_initShader:function(b){var c=this,d;return d=a.webgl.shader.addShaderProgram(c._gl,h,i),b.useProgram(d),d.vertexPositionAttr=b.getAttribLocation(d,"aVertexPosition"),b.enableVertexAttribArray(d.vertexPositionAttr),d.textureCoordAttr=b.getAttribLocation(d,"aTextureCoord"),b.enableVertexAttribArray(d.textureCoordAttr),d.vertexNormalAttr=b.getAttribLocation(d,"aVertexNormal"),b.enableVertexAttribArray(d.vertexNormalAttr),d.perspectiveMU=b.getUniformLocation(d,"uPerspectiveMatrix"),d.transformMU=b.getUniformLocation(d,"uMoveMatrix"),d.sampleUniform=b.getUniformLocation(d,"uSampler"),d.normalMU=b.getUniformLocation(d,"nNormalMatrix"),d.ambientColorU=b.getUniformLocation(d,"uAmbientColor"),d.lightDirU_first=b.getUniformLocation(d,"uLightDirection_first"),d.lightDirU_second=b.getUniformLocation(d,"uLightDirection_second"),d.directionColorU=b.getUniformLocation(d,"uDirectionColor"),d},_initBuffers:function(b,c){var d=this,f=0,g=0,h=[],i=[],l=[],m=[],n=d._MAX_ITEM_COUNT;for(f=0;f<d._imageList.length+1;f+=1)m[f]=new e,a.merge(h,m[f].vertices),a.merge(i,m[f].textureCoords),a.merge(l,m[f].normalVectors),m[f].textureBuffer=b.createBuffer(),b.bindBuffer(b.ELEMENT_ARRAY_BUFFER,m[f].textureBuffer),g=f*4,m[f].meshOrder=[g,g+1,g+2,g+2,g+3,g],b.bufferData(b.ELEMENT_ARRAY_BUFFER,new k(m[f].meshOrder),b.STATIC_DRAW),b.bindBuffer(b.ELEMENT_ARRAY_BUFFER,null),m[f].textureBufferItemSize=6;return d._positionBuffer=a.webgl.buffer.attribBufferData(b,new j(h)),d._positionBuffer.itemSize=3,d._textureCoordBuffer=a.webgl.buffer.attribBufferData(b,new j(i)),d._textureCoordBuffer.itemSize=2,d._normalVectorBuffer=a.webgl.buffer.attribBufferData(b,new j(l)),d._normalVectorBuffer.itemSize=3,b.uniform3f(c.ambientColorU,.1,.1,.1),b.uniform3f(c.directionColorU,1,1,1),m},_initTextures:function(b,c){var d=this;a(c).each(function(a){var e=c[a],f;if(!d._imageList[a])return!1;f=d._imageList[a].src,e.texture=b.createTexture(),d._loadImage(f,a,a,b,c)})},_loadImage:function(b,c,d,e,f){var g=this,h=!1,i,j;e=e||g._gl,f=f||g._nodes,h=h||!1,j=f[c],j.image=j.image||new Image,a(j.image).one("load",function(a){g._bindTexture(e,j,this,h),j.imageID=d,g._animationID||g._setPosition(0,0)}),g.options.thumbnailCache?a.imageloader.getThumbnail(b,function(c){c==="NOT_FOUND_ERR"?a.imageloader.setThumbnail(b,function(a){a&&a.length>30?(j.image.src=a,h=!0):j.image.src=b}):c&&c.length>30?(j.image.src=c,h=!0):j.image.src=b}):j.image.src=b},_bindTexture:function(a,b,c,d){if(!b||!b.texture)return;a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,!0),a.bindTexture(a.TEXTURE_2D,b.texture),a.texImage2D(a.TEXTURE_2D,0,a.RGBA,a.RGBA,a.UNSIGNED_BYTE,c),d?(a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,a.LINEAR),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.LINEAR_MIPMAP_NEAREST),a.generateMipmap(a.TEXTURE_2D)):(a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,a.LINEAR),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.LINEAR)),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE),b.texture.loaded=!0,a.bindTexture(a.TEXTURE_2D,null)},_setPosition:function(a,b){var c=this,d=g.mat4,e=c._nodes,f=c._imageList,h=f.length,i=c._MAX_ITEM_COUNT,j=h>i?i:h,k=0,l=0,n=0,o=0,p=0,q=0,r=0,s=0,t=c._path,u=0;k=b>=0?j+1:j,e[l].level||(e[l].level=j);for(l=0;l<j;l+=1)e[l].mvMatrix||(e[l].mvMatrix=d.create()),b>0&&e[l].level>=j&&(e[l].level=0),q=t.levels[e[l].level],s=(e[l].level+k+b)%k,r=t.levels[s],h>i&&(b>0&&s===1&&c._firstImageNumber!==e[l].imageID?c._loadImage(f[c._firstImageNumber].src,l,c._firstImageNumber):b<0&&s===k-1&&c._lastImageNumber!==e[l].imageID&&c._loadImage(f[c._lastImageNumber].src,l,c._lastImageNumber)),d.identity(e[l].mvMatrix),d.translate(e[l].mvMatrix,[-2,-2,1]),d.rotate(e[l].mvMatrix,m(19),[1,0,0]),n=q+(r-q)*(a>1?1:a),a>=c._ANIMATION_END&&(e[l].level=s||j,n=t.levels[e[l].level]),a<c._ANIMATION_END&&b<=0&&e[l].level<1?e[l].drawable=!1:e[l].drawable=!0,a===c._ANIMATION_END&&e[l].level===1&&c.element.trigger("select",f[e[l].imageID],e[l].imageID),o=t.getPosition(n),p=t.getAngle(n),d.translate(e[l].mvMatrix,o),d.rotate(e[l].mvMatrix,p,[0,1,0]);h>i&&a>=c._ANIMATION_END&&(c._firstImageNumber=(c._firstImageNumber-b)%h,c._firstImageNumber<0&&(c._firstImageNumber=h-1),c._lastImageNumber=(c._lastImageNumber-b)%h,c._lastImageNumber<0&&(c._lastImageNumber=h-1)),c._drawScene()},_drawScene:function(){if(!this._gl||!this._shaderProgram)return;var a=this,b=a._gl,c=a._shaderProgram,d=a._nodes,e=d.length,f;b.clear(b.COLOR_BUFFER_BIT|b.DEPTH_BUFFER_BIT),b.bindBuffer(b.ARRAY_BUFFER,a._positionBuffer),b.vertexAttribPointer(c.vertexPositionAttr,a._positionBuffer.itemSize,b.FLOAT,!1,0,0),b.bindBuffer(b.ARRAY_BUFFER,a._textureCoordBuffer),b.vertexAttribPointer(c.textureCoordAttr,a._textureCoordBuffer.itemSize,b.FLOAT,!1,0,0),b.bindBuffer(b.ARRAY_BUFFER,a._normalVectorBuffer),b.vertexAttribPointer(c.vertexNormalAttr,a._normalVectorBuffer.itemSize,b.FLOAT,!1,0,0);for(f=0;f<e;f+=1)d[f].drawable&&a._drawElement(a._pMatrix,d[f])},_drawElement:function(a,b){var c=this,d=c._gl,e=g.vec3,f=g.mat3,h=g.mat4,i=c._shaderProgram,j=b.mvMatrix,k=b.texture,l=b.textureBuffer,m=b.textureBufferItemSize,n=c._lightsPositionStack,o,p;if(!j)return;d.activeTexture(d.TEXTURE0),k&&k.loaded&&d.bindTexture(d.TEXTURE_2D,k),d.uniform1i(i.sampleUniform,0),o=e.create(),e.normalize(n[0],o),e.scale(o,-8),d.uniform3fv(i.lightDirU_first,o),e.normalize(n[1],o),e.scale(o,-1),d.uniform3fv(i.lightDirU_second,o),d.bindBuffer(d.ELEMENT_ARRAY_BUFFER,l),d.uniformMatrix4fv(i.perspectiveMU,!1,a),d.uniformMatrix4fv(i.transformMU,!1,j),p=f.create(),h.toInverseMat3(j,p),f.transpose(p),d.uniformMatrix3fv(i.normalMU,!1,p),d.drawElements(d.TRIANGLES,m,d.UNSIGNED_SHORT,0),d.bindBuffer(d.ARRAY_BUFFER,null),d.bindBuffer(d.ELEMENT_ARRAY_BUFFER,null),d.bindTexture(d.TEXTURE_2D,null)},_animate:function(b,c,d,e,f,g){var h=this,i=a.now(),j,k=0;b=b||"linear",f=f||0,g=g||0;if(h._sumTime>=c){h._setPosition(h._ANIMATION_END,d),h._stop();return}if(h._startTime===0)h._startTime=i;else{h._sumTime=i-h._startTime,j=a.easing[b](h._sumTime/c,h._sumTime,f,e+1,c),k=parseInt(Math.abs(j),10);if(g!==k){h._setPosition(h._ANIMATION_END,d),g=k,e-g>=0?h._animate(b,c,d,e,f,g):h._stop();return}h._setPosition(j-g,d)}h._animationID=o(function(){h._animate(b,c,d,e,f,g)})},_run:function(a,b,c){var d=this,e=b||0,f=d._DURATION_DEFAULT*(e+1);if(d._imageList.length<=1)return;c=c||0,f=f>=0?f:0,d._animationID&&(d._setPosition(d._ANIMATION_END,a),d._stop()),d._animate("easeOutExpo",f,a,e,c)},_reset:function(){if(!this._canvas||!this._gl)return;this._final(),this._init(),this.refresh()},_stop:function(){this._animationID&&p(this._animationID),this._animationID=0,this._startTime=0,this._sumTime=0},next:function(){this._run(this._DIRECTION_LEFT,0)},prev:function(){this._run(this._DIRECTION_RIGHT,0)},refresh:function(){var a=this.element,b=a.find("canvas.ui-gallery3d-canvas");b.width()!==a.width()&&b.width(a.width()),this._animationID||this._setPosition(0,0)},select:function(a){var b=this._nodes,c,d,e,f=null,g=0,h=0;a&&this._animationID&&this._stop();for(d in b)if(b[d].level===1){f=this._imageList[b[d].imageID],e=b[d].imageID;break}if(!a)return f;if(a<0&&a>=this._imageList.length)return;g=a-e,h=g>0?this._DIRECTION_LEFT:g<0?this._DIRECTION_RIGHT:0,h&&this._run(h,Math.abs(g)-1)},add:function(a,b){if(!a)return;typeof a=="string"&&(a={src:a}),b=b||0;if(typeof b!="number"&&b<0&&b>=this._imageList.length)return;this._imageList.splice(b,0,a),this._gl&&this._reset()},remove:function(a){a=a||0;if(typeof a!="number"&&a<0&&a>=this._imageList.length)return;this._imageList.splice(a,1),this._gl&&this._reset()},clearThumbnailCache:function(){if(!this._nodes||this._nodes.length<=0)return;var b,c;for(b=0;b<this._imageList.length;b+=1)c=this._imageList[b].src,a.imageloader.removeThumbnail(c)},empty:function(){this._imageList=[],this._reset()},length:function(){return this._imageList.length}}),a(b).on("pagecreate create",function(b){a(":jqmData(role='gallery3d')").gallery3d()}).on("pagechange",function(b){a(b.target).find(".ui-gallery3d").gallery3d("refresh")}),a(c).on("resize orientationchange"
268 ,function(b){a(".ui-page-active").find(".ui-gallery3d").gallery3d("refresh")})}(jQuery,document,window),function(a,b,c,d){function e(c){var d=a(c),e=d.children(".ui-content"),f=d.children(".ui-header").outerHeight()||0,g=d.children(".ui-footer").outerHeight()||0,h=parseFloat(e.css("padding-top")),i=parseFloat(e.css("padding-bottom")),j=a(b).height();e.height(j-(f+g)-(h+i))}function f(b){this.options=a.extend({},b),this.easing="easeOutQuad",this.reset()}function h(){return Date.now()}var g={scrolling:0,overshot:1,snapback:2,done:3};jQuery.widget("tizen.scrollview",jQuery.mobile.widget,{options:{direction:null,timerInterval:10,scrollDuration:1e3,overshootDuration:250,snapbackDuration:500,moveThreshold:30,moveIntervalThreshold:150,scrollMethod:"translate",startEventName:"scrollstart",updateEventName:"scrollupdate",stopEventName:"scrollstop",eventType:a.support.touch?"touch":"mouse",showScrollBars:!0,overshootEnable:!1,outerScrollEnable:!1,overflowEnable:!0,scrollJump:!1},_getViewHeight:function(){return this._$view.height()},_getViewWidth:function(){return this._$view.width()},_makePositioned:function(a){a.css("position")==="static"&&a.css("position","relative")},_create:function(){var b,c=this;this._$clip=a(this.element).addClass("ui-scrollview-clip"),this._$clip.children(".ui-scrollview-view").length?this._$view=this._$clip.children(".ui-scrollview-view"):this._$view=this._$clip.wrapInner("<div></div>").children().addClass("ui-scrollview-view"),this.options.scrollMethod==="translate"&&this._$view.css("transform")===d&&(this.options.scrollMethod="position"),this._$clip.css("overflow","hidden"),this._makePositioned(this._$clip),this._makePositioned(this._$view),this._$view.css({left:0,top:0}),this._view_height=this._getViewHeight(),this._sx=0,this._sy=0,b=this.options.direction,this._hTracker=b!=="y"?new f(this.options):null,this._vTracker=b!=="x"?new f(this.options):null,this._timerInterval=this.options.timerInterval,this._timerID=0,this._timerCB=function(){c._handleMomentumScroll()},this._add_event(),this._add_scrollbar(),this._add_scroll_jump(),this._add_overflow_indicator()},_startMScroll:function(a,b){var c=!1,d=this.options.scrollDuration,e=this._hTracker,f=this._vTracker,g,h;this._$clip.trigger(this.options.startEventName);if(e){g=this._$clip.width(),h=this._getViewWidth();if((this._sx===0&&a>0||this._sx===-(h-g)&&a<0)&&h>g)return;e.start(this._sx,a,d,h>g?-(h-g):0,0),c=!e.done()}if(f){g=this._$clip.height(),h=this._getViewHeight();if((this._sy===0&&b>0||this._sy===-(h-g)&&b<0)&&h>g)return;f.start(this._sy,b,d,h>g?-(h-g):0,0),c=c||!f.done()}c?this._timerID=setTimeout(this._timerCB,this._timerInterval):this._stopMScroll()},_stopMScroll:function(){this._timerID&&(this._$clip.trigger(this.options.stopEventName),clearTimeout(this._timerID)),this._timerID=0,this._vTracker&&this._vTracker.reset(),this._hTracker&&this._hTracker.reset(),this._hideScrollBars(),this._hideOverflowIndicator()},_handleMomentumScroll:function(){var a=!1,b=0,c=0,d=0,e=this,f=this._vTracker,g=this._hTracker;if(this._outerScrolling)return;f&&(f.update(this.options.overshootEnable),c=f.getPosition(),a=!f.done(),f.getRemained()>this.options.overshootDuration&&(d=this._getViewHeight()-this._$clip.height(),f.isAvail()?f.isMin()?this._outerScroll(c-f.getRemained()/3,d):f.isMax()&&this._outerScroll(f.getRemained()/3,d):this._speedY>0?this._outerScroll(f.getRemained()/3,d):this._outerScroll(c-f.getRemained()/3,d))),g&&(g.update(this.options.overshootEnable),b=g.getPosition(),a=a||!g.done()),this._setScrollPosition(b,c),this._$clip.trigger(this.options.updateEventName,[{x:b,y:c}]),a?this._timerID=setTimeout(this._timerCB,this._timerInterval):this._stopMScroll()},_setElementTransform:function(b,c,e,f){var g,h;!f||f===d?h="none":h="-webkit-transform "+f/1e3+"s ease-out",a.support.cssTransform3d?g="translate3d("+c+","+e+", 0px)":g="translate("+c+","+e+")",b.css({"-moz-transform":g,"-webkit-transform":g,"-ms-transform":g,"-o-transform":g,transform:g,"-webkit-transition":h})},_setEndEffect:function(a){var b=this._getViewHeight()-this._$clip.height();if(this._softkeyboard){this._effect_dir?this._outerScroll(-b-this._softkeyboardHeight,b):this._outerScroll(this._softkeyboardHeight,b);return}if(a==="in"){if(this._endEffect)return;this._endEffect=!0,this._setOverflowIndicator(this._effect_dir),this._showOverflowIndicator()}else if(a==="out"){if(!this._endEffect)return;this._endEffect=!1}else this._endEffect=!1,this._setOverflowIndicator(),this._showOverflowIndicator()},_setCalibration:function(a,b){if(this.options.overshootEnable){this._sx=a,this._sy=b;return}var c=this._$view,d=this._$clip,e=this._directionLock,f=0,g=0;e!=="y"&&this._hTracker&&(g=c.width()-d.width(),a>=0?this._sx=0:a<-g?this._sx=-g:this._sx=a,g<0&&(this._sx=0)),e!=="x"&&this._vTracker&&(f=this._getViewHeight()-d.height(),b>0?(this._sy=0,this._effect_dir=0,this._setEndEffect("in")):b<-f?(this._sy=-f,this._effect_dir=1,this._setEndEffect("in")):(this._endEffect&&this._sy!==b&&this._setEndEffect(),this._sy=b),f<0&&(this._sy=0))},_setScrollPosition:function(a,b,c){var d=this._$view,e=this.options.scrollMethod,f=this._$vScrollBar,g=this._$hScrollBar,h;this._setCalibration(a,b),a=this._sx,b=this._sy,e==="translate"?this._setElementTransform(d,a+"px",b+"px",c):d.css({left:a+"px",top:b+"px"}),f&&(h=f.find(".ui-scrollbar-thumb"),e==="translate"?this._setElementTransform(h,"0px",-b/this._getViewHeight()*h.parent().height()+"px",c):h.css("top",-b/this._getViewHeight()*100+"%")),g&&(h=g.find(".ui-scrollbar-thumb"),e==="translate"?this._setElementTransform(h,-a/d.width()*h.parent().width()+"px","0px",c):h.css("left",-a/d.width()*100+"%"))},_outerScroll:function(c,e){var f=this,g=a(b).scrollTop()-b.screenTop,i=0,j=this.options.snapbackDuration,k=h(),l;if(!this.options.outerScrollEnable)return;if(this._$clip.jqmData("scroll")!=="y")return;if(this._outerScrolling)return;if(c>0)i=b.screenTop?b.screenTop:-c;else{if(!(c<-e))return;i=-c-e}l=function(){var c=h()-k;c>=j?(b.scrollTo(0,g+i),f._outerScrolling=d,f._stopMScroll()):(ec=a.easing.easeOutQuad(c/j,c,0,1,j),b.scrollTo(0,g+i*ec),f._outerScrolling=setTimeout(l,f._timerInterval))},this._outerScrolling=setTimeout(l,f._timerInterval)},_scrollTo:function(b,c,d){var e=this,f=h(),g=a.easing.easeOutQuad,i=this._sx,j=this._sy,k=b-i,l=c-j,m;b=-b,c=-c,m=function(){var a=h()-f,n;a>=d?(e._timerID=0,e._setScrollPosition(b,c)):(n=g(a/d,a,0,1,d),e._setScrollPosition(i+k*n,j+l*n),e._timerID=setTimeout(m,e._timerInterval))},this._timerID=setTimeout(m,this._timerInterval)},scrollTo:function(a,b,c){this._stopMScroll(),this._didDrag=!1,!c||this.options.scrollMethod==="translate"?this._setScrollPosition(a,b,c):this._scrollTo(a,b,c)},getScrollPosition:function(){return{x:-this._sx,y:-this._sy}},skipDragging:function(a){this._skip_dragging=a},_getScrollHierarchy:function(){var b=[],c;return this._$clip.parents(".ui-scrollview-clip").each(function(){c=a(this).jqmData("scrollview"),c&&b.unshift(c)}),b},_getAncestorByDirection:function(a){var b=this._getScrollHierarchy(),c=b.length,d,e;while(0<c--){d=b[c],e=d.options.direction;if(!e||e===a)return d}return null},_handleDragStart:function(b,c,d){this._stopMScroll(),this._didDrag=!1,this._skip_dragging=!1;var e=a(b.target),f=this,g=this._$clip,h=this.options.direction;this._is_button=e.is(".ui-btn")||e.is(".ui-btn-text")||e.is(".ui-btn-inner")||e.is(".ui-btn-inner .ui-icon");if(e.parents(".ui-slider").length||e.is(".ui-slider")){this._skip_dragging=!0;return}e.is("textarea")&&e.bind("scroll",function(){f._skip_dragging=!0,e.unbind("scroll")}),this._is_inputbox=e.is(":input")||e.parents(":input").length>0,this._is_inputbox&&e.one("resize.scrollview",function(){d>g.height()&&f.scrollTo(-c,f._sy-d+g.height(),f.options.snapbackDuration)}),this.options.eventType==="mouse"&&!this._is_inputbox&&!this._is_button&&b.preventDefault(),this._lastX=c,this._lastY=d,this._startY=d,this._doSnapBackX=!1,this._doSnapBackY=!1,this._speedX=0,this._speedY=0,this._directionLock="",this._lastMove=0,this._enableTracking(),this._set_scrollbar_size()},_propagateDragMove:function(a,b,c,d,e){this._hideScrollBars(),this._hideOverflowIndicator(),this._disableTracking(),a._handleDragStart(b,c,d),a._directionLock=e,a._didDrag=this._didDrag},_handleDragMove:function(b,c,d){if(this._skip_dragging)return;if(!this._dragging)return;!this._is_inputbox&&!this._is_button&&b.preventDefault();var e=this.options.moveThreshold,f=c-this._lastX,g=d-this._lastY,i=this.options.direction,j=null,k,l,m,n,o,p,q;this._lastMove=h();if(!this._directionLock){k=Math.abs(f),l=Math.abs(g);if(k<e&&l<e)return!1;k<l&&k/l<.5?j="y":k>l&&l/k<.5&&(j="x");if(i&&j&&i!==j){m=this._getAncestorByDirection(j);if(m)return this._propagateDragMove(m,b,c,d,j),!1}this._directionLock=i||j||"none"}o=this._sx,p=this._sy,q=this._directionLock;if(q!=="y"&&this._hTracker){k=this._sx,this._speedX=f,o=k+f,this._doSnapBackX=!1,n=o>0||o<this._maxX;if(n&&q==="x"){m=this._getAncestorByDirection("x");if(m)return this._setScrollPosition(o>0?0:this._maxX,p),this._propagateDragMove(m,b,c,d,j),!1;o=k+f/2,this._doSnapBackX=!0}}if(q!=="x"&&this._vTracker){if(Math.abs(this._startY-d)<e&&q!=="xy")return;l=this._sy,this._speedY=g,p=l+g,this._doSnapBackY=!1,n=p>0||p<this._maxY;if(n&&q==="y"){m=this._getAncestorByDirection("y");if(m)return this._setScrollPosition(o,p>0?0:this._maxY),this._propagateDragMove(m,b,c,d,j),!1;p=l+g/2,this._doSnapBackY=!0}}this.options.overshootEnable===!1&&(this._doSnapBackX=!1,this._doSnapBackY=!1),this._lastX=c,this._lastY=d,this._setScrollPosition(o,p),this._didDrag===!1&&(this._didDrag=!0,this._showScrollBars(),this._showOverflowIndicator(),this._$clip.parents(".ui-scrollview-clip").each(function(){a(this).scrollview("skipDragging",!0)}))},_handleDragStop:function(a){var b=this;if(this._skip_dragging)return;var c=this._lastMove,d=h(),e=c&&d-c<=this.options.moveIntervalThreshold,f=this._hTracker&&this._speedX&&e?this._speedX:this._doSnapBackX?1:0,g=this._vTracker&&this._speedY&&e?this._speedY:this._doSnapBackY?1:0,i=this.options.direction,j,k;return f||g?this._setGestureScroll(f,g)||this._startMScroll(f,g):(this._hideScrollBars(),this._hideOverflowIndicator()),this._disableTracking(),this._endEffect&&setTimeout(function(){b._setEndEffect("out"),b._hideScrollBars(),b._hideOverflowIndicator()},300),!this._didDrag},_setGestureScroll:function(a,b){var c=this,e=function(){clearTimeout(c._gesture_timer),c._gesture_dir=0,c._gesture_timer=d},f={top:0,bottom:1,left:2,right:3};return!b&&!a?!1:(Math.abs(a)>Math.abs(b)?dir=a>0?f.left:f.right:dir=b>0?f.top:f.bottom,this._gesture_timer?this._gesture_dir!==dir?(e(),!1):!1:(this._gesture_dir=dir,this._gesture_timer=setTimeout(function(){e()},1e3),!1))},_enableTracking:function(){this._dragging=!0},_disableTracking:function(){this._dragging=!1},_showScrollBars:function(a){var b="ui-scrollbar-visible",c=this;if(!this.options.showScrollBars)return;if(this._scrollbar_showed)return;this._$vScrollBar&&this._$vScrollBar.addClass(b),this._$hScrollBar&&this._$hScrollBar.addClass(b),this._scrollbar_showed=!0,a&&setTimeout(function(){c._hideScrollBars()},a)},_hideScrollBars:function(){var a="ui-scrollbar-visible";if(!this.options.showScrollBars)return;if(!this._scrollbar_showed)return;this._$vScrollBar&&this._$vScrollBar.removeClass(a),this._$hScrollBar&&this._$hScrollBar.removeClass(a),this._scrollbar_showed=!1},_setOverflowIndicator:function(a){a===1?(this._opacity_top="0",this._opacity_bottom="0.8"):a===0?(this._opacity_top="0.8",this._opacity_bottom="0"):(this._opacity_top="0.5",this._opacity_bottom="0.5")},_showOverflowIndicator:function(){if(!this.options.overflowEnable||!this._overflowAvail||this._softkeyboard)return;this._overflow_top.animate({opacity:this._opacity_top},300),this._overflow_bottom.animate({opacity:this._opacity_bottom},300),this._overflow_showed=!0},_hideOverflowIndicator:function(){if(!this.options.overflowEnable||!this._overflowAvail||this._softkeyboard)return;if(this._overflow_showed===!1)return;this._overflow_top.animate({opacity:0},300),this._overflow_bottom.animate({opacity:0},300),this._overflow_showed=!1,this._setOverflowIndicator()},_add_event:function(){var c=this,e=this._$clip,f=this._$view;this.options.eventType==="mouse"?(this._dragEvt="mousedown mousemove mouseup click mousewheel",this._dragCB=function(a){switch(a.type){case"mousedown":return c._handleDragStart(a,a.clientX,a.clientY);case"mousemove":return c._handleDragMove(a,a.clientX,a.clientY);case"mouseup":return c._handleDragStop(a);case"click":return!c._didDrag;case"mousewheel":var b=c.getScrollPosition();c.scrollTo(-b.x,-(b.y-a.originalEvent.wheelDelta))}}):(this._dragEvt="touchstart touchmove touchend click",this._dragCB=function(a){var b=a.originalEvent.touches;switch(a.type){case"touchstart":if(b.length!=1)return;return c._handleDragStart(a,b[0].pageX,b[0].pageY);case"touchmove":if(b.length!=1)return;return c._handleDragMove(a,b[0].pageX,b[0].pageY);case"touchend":if(b.length!=0)return;return c._handleDragStop(a);case"click":return!c._didDrag}}),f.bind(this._dragEvt,this._dragCB),f.bind("keydown",function(f){var g,h,i=a(b).scrollTop()-b.screenTop,j;if(f.keyCode==9)return!1;g=e.find(".ui-focus");if(g===d)return;h=g.offset().top-i,j=e.offset().top+e.height()-g.height(),c._softkeyboard&&(j-=c._softkeyboardHeight),(h<e.offset().top||h>j)&&c.scrollTo(0,c._sy-(h-e.offset().top-g.height()));return}),f.bind("keyup",function(d){var f,g,h,j=a(b).scrollTop()-b.screenTop,k;if(d.keyCode!=9)return;f=a(this).find(":input");for(i=0;i<f.length;i++){if(!a(f[i]).hasClass("ui-focus"))continue;i+1==f.length?g=a(f[0]):g=a(f[i+1]),h=g.offset().top-j,k=e.offset().top+e.height()-g.height(),c._softkeyboard&&(k-=c._softkeyboardHeight),(h<0||h>k)&&c.scrollTo(0,c._sy-h+g.height()+e.offset().top,0),g.focus();break}return!1}),e.bind("updatelayout",function(a){var b,d,f=c._getViewHeight();if(!e.height()||!f){c.scrollTo(0,0,0);return}b=e.height()-f,d=f-c._view_height,c._view_height=f;if(d==0||d>e.height()/2)return;b>0?c.scrollTo(0,0,0):c._sy-b<=-d?c.scrollTo(0,c._sy,c.options.snapbackDuration):c._sy-b<=d+c.options.moveThreshold&&c.scrollTo(0,b,c.options.snapbackDuration)}),a(b).bind("resize",function(b){var d,f=c._getViewHeight();if(a(".ui-page-active").get(0)!==e.closest(".ui-page").get(0))return;if(!e.height()||!f)return;d=e.find(".ui-focus"),d&&d.trigger("resize.scrollview"),setTimeout(function(){c._sy<e.height()-c._getViewHeight()&&c.scrollTo(0,e.height()-c._getViewHeight(),c.options.overshootDuration)},260),c._view_height=f}),a(b).bind("vmouseout",function(d){var f=!1;if(a(".ui-page-active").get(0)!==e.closest(".ui-page").get(0))return;if(!c._dragging)return;if(d.pageX<0||d.pageX>a(b).width())f=!0;if(d.pageY<0||d.pageY>a(b).height())f=!0;f&&(c._hideScrollBars(),c._hideOverflowIndicator(),c._disableTracking())}),this._softkeyboard=!1,this._softkeyboardHeight=0,b.addEventListener("softkeyboardchange",function(d){if(a(".ui-page-active").get(0)!==e.closest(".ui-page").get(0))return;c._softkeyboard=d.state==="on"?!0:!1,c._softkeyboardHeight=parseInt(d.height)*(a(b).width()/b.screen.availWidth)}),e.closest(".ui-page").bind("pageshow",function(a){setTimeout(function(){c._view_height=c._getViewHeight(),c._set_scrollbar_size(),c._setScrollPosition(c._sx,c._sy),c._showScrollBars(2e3)},0)})},_add_scrollbar:function(){var a=this._$clip,b='<div class="ui-scrollbar ui-scrollbar-',c='"><div class="ui-scrollbar-track"><div class="ui-scrollbar-thumb"></div></div></div>';if(!this.options.showScrollBars)return;this._vTracker&&(a.append(b+"y"+c),this._$vScrollBar=a.children(".ui-scrollbar-y")),this._hTracker&&(a.append(b+"x"+c),this._$hScrollBar=a.children(".ui-scrollbar-x")),this._scrollbar_showed=!1},_add_scroll_jump:function(){var b=this._$clip,c=this,d,e;if(!this.options.scrollJump)return;this._vTracker&&(d=a('<div class="ui-scroll-jump-top-bg"><div data-role="button" data-inline="true" data-icon="scrolltop" data-style="box"></div></div>'),b.append(d).trigger("create"),d.bind("vclick",function(){c.scrollTo(0,0,c.options.overshootDuration)})),this._hTracker&&(e=a('<div class="ui-scroll-jump-left-bg"><div data-role="button" data-inline="true" data-icon="scrollleft" data-style="box"></div></div>'),b.append(e).trigger("create"),e.bind("vclick",function(){c.scrollTo(0,0,c.options.overshootDuration)}))},_add_overflow_indicator:function(){if(!this.options.overflowEnable)return;this._overflow_top=a('<div class="ui-overflow-indicator-top"></div>'),this._overflow_bottom=a('<div class="ui-overflow-indicator-bottom"></div>'),this._$clip.append(this._overflow_top),this._$clip.append(this._overflow_bottom),this._opacity_top="0.5",this._opacity_bottom="0.5",this._overflow_showed=!1},_set_scrollbar_size:function(){var a=this._$clip,b=this._$view,c=0,d=0,e=0,f=0,g;if(!this.options.showScrollBars)return;this._hTracker&&(c=a.width(),d=b.width(),this._maxX=c-d,this._maxX>0&&(this._maxX=0),this._$hScrollBar&&d&&(g=this._$hScrollBar.find(".ui-scrollbar-thumb"),g.css("width",c>=d?"0":(Math.floor(c/d*100)||1)+"%")));if(this._vTracker){e=a.height(),f=this._getViewHeight(),this._maxY=e-f;if(this._maxY>0||f===0)this._maxY=0;if(this._$vScrollBar&&f||f===0)g=this._$vScrollBar.find(".ui-scrollbar-thumb"),g.css("height",e>=f?"0":(Math.floor(e/f*100)||1)+"%"),this._overflowAvail=!!g.height()}}}),a.extend(f.prototype,{start:function(a,b,c,d,e){var f=a<d||a>e?g.snapback:g.scrolling,i;this.state=b!==0?f:g.done,this.pos=a,this.speed=b,this.duration=this.state===g.snapback?this.options.snapbackDuration:c,this.minPos=d,this.maxPos=e,this.fromPos=this.state===g.snapback?this.pos:0,i=this.pos<this.minPos?this.minPos:this.maxPos,this.toPos=this.state===g.snapback?i:0,this.startTime=h()},reset:function(){this.state=g.done,this.pos=0,this.speed=0,this.minPos=0,this.maxPos=0,this.duration=0,this.remained=0},update:function(b){var c=this.state,d=h(),e=this.duration,f=d-this.startTime,i,j,k;return c===g.done?this.pos:(f=f>e?e:f,this.remained=e-f,c===g.scrolling||c===g.overshot?(i=this.speed*(1-a.easing[this.easing](f/e,f,0,1,e)),j=this.pos+i,k=c===g.scrolling&&(j<this.minPos||j>this.maxPos),k&&(j=j<this.minPos?this.minPos:this.maxPos),this.pos=j,c===g.overshot?(b||(this.state=g.done),f>=e&&(this.state=g.snapback,this.fromPos=this.pos,this.toPos=j<this.minPos?this.minPos:this.maxPos,this.duration=this.options.snapbackDuration,this.startTime=d,f=0)):c===g.scrolling&&(k&&b?(this.state=g.overshot,this.speed=i/2,this.duration=this.options.overshootDuration,this.startTime=d):f>=e&&(this.state=g.done))):c===g.snapback&&(f>=e?(this.pos=this.toPos,this.state=g.done):this.pos=this.fromPos+(this.toPos-this.fromPos)*a.easing[this.easing](f/e,f,0,1,e)),this.pos)},done:function(){return this.state===g.done},isMin:function(){return this.pos===this.minPos},isMax:function(){return this.pos===this.maxPos},isAvail:function(){return this.minPos!==this.maxPos},getRemained:function(){return this.remained},getPosition:function(){return this.pos}}),a(c).bind("pagecreate create",function(b){var c=a(b.target),e=c.find(".ui-content").jqmData("scroll");a.support.scrollview===d&&(a.support.scrollview=!0),a.support.scrollview===!0&&e===d&&(e="y"),e!=="y"&&(e="none"),c.find(".ui-content").attr("data-scroll",e),c.find(":jqmData(scroll)").not(".ui-scrollview-clip").each(function(){if(a(this).hasClass("ui-scrolllistview"))a(this).scrolllistview();else{var b=a(this).jqmData("scroll"),c=b&&b.search(/^[xy]/)!==-1?b:null,e=a(this).hasClass("ui-content"),f;if(b==="none")return;f={direction:c||d,overflowEnable:e,scrollMethod:a(this).jqmData("scroll-method")||d,scrollJump:a(this).jqmData("scroll-jump")||d},a(this).scrollview(f)}})}),a(c).bind("pageshow",function(b){var c=a(b.target),d=c.find(".ui-content").jqmData("scroll");d==="y"&&e(b.target)})}(jQuery,window,document),ensureNS("jQuery.mobile.tizen.clrlib"),jQuery.extend(jQuery.mobile.tizen.clrlib,{nearestInt:function(a){var b=Math.floor(a);return a-b>.5?b+1:b},HTMLToRGB:function(a){return a="#"==a.charAt(0)?a.substring(1):a,[a.substring(0,2),a.substring(2,4),a.substring(4,6)].map(function(a){return parseInt(a,16)/255})},RGBToHTML:function(a){return"#"+a.map(function(a){var b=a*255,c=Math.floor(b);return b=b-c>.5?c+1:c,b=(b<16?"0":"")+(b&255).toString(16),b}).join("")},HSLToRGB:function(a){var b=a[0]/360,c=a[1],d=a[2];if(0===c)return[d,d,d];var e=d<.5?d*(1+c):d+c-d*c,f=2*d-e,g={r:b+1/3,g:b,b:b-1/3};return g.r=g.r<0?g.r+1:g.r>1?g.r-1:g.r,g.g=g.g<0?g.g+1:g.g>1?g.g-1:g.g,g.b=g.b<0?g.b+1:g.b>1?g.b-1:g.b,ret=[6*g.r<1?f+(e-f)*6*g.r:2*g.r<1?e:3*g.r<2?f+(e-f)*(2/3-g.r)*6:f,6*g.g<1?f+(e-f)*6*g.g:2*g.g<1?e:3*g.g<2?f+(e-f)*(2/3-g.g)*6:f,6*g.b<1?f+(e-f)*6*g.b:2*g.b<1?e:3*g.b<2?f+(e-f)*(2/3-g.b)*6:f],ret},HSVToRGB:function(a){return $.mobile.tizen.clrlib.HSLToRGB($.mobile.tizen.clrlib.HSVToHSL(a))},RGBToHSV:function(a){var b,c,d,e,f,g,h=a[0],i=a[1],j=a[2];return b=Math.min(h,Math.min(i,j)),c=Math.max(h,Math.max(i,j)),d=c-b,e=0,f=0,g=c,d>1e-5&&(f=d/c,h===c?e=(i-j)/d:i===c?e=2+(j-h)/d:e=4+(h-i)/d,e*=60,e<0&&(e+=360)),[e,f,g]},HSVToHSL:function(a){var b=a[2],c=a[1]*b,d=b-c,e=b+d,f=e/2,g=f<.5?e:2-b-d;return[a[0],0==g?0:c/g,f]},RGBToHSL:function(a){return $.mobile.tizen.clrlib.HSVToHSL($.mobile.tizen.clrlib.RGBToHSV(a))}}),function(a,b,c){pinch_event={setup:function(){function f(a){var b=a[0].x-a[1].x,c=a[0].y-a[1].y;return Math.abs(b*c)}function g(a,b){return{point:a,ratio:b}}var d=this,e=a(d);if(!a.mobile.support.touch)return;e.bind("touchstart",function(d){function l(c){var d=c.originalEvent.touches,e,h,l,m=a(b).width()/a.mobile.pinch.factor;if(k)return;if(!i)return;e=[{x:d[0].pageX,y:d[0].pageY},{x:d[1].pageX,y:d[1].pageY}],l=Math.sqrt(f(e)/f(i)),l&&(h=l),h<a.mobile.pinch.min?h=a.mobile.pinch.min:h>a.mobile.pinch.max&&(h=a.mobile.pinch.max);if(Math.abs(h-j)<a.mobile.pinch.threshold)return;a(c.target).trigger("pinch",g(e,h)),j=h,a.mobile.pinch.interval&&(k=!0,setTimeout(function(){k=!1},a.mobile.pinch.interval))}var h=d.originalEvent.touches,i,j=1,k=!1;if(!a.mobile.pinch.enabled)return;if(h.length!=2)return;i=[{x:h[0].pageX,y:h[0].pageY},{x:h[1].pageX,y:h[1].pageY}],a(d.target).trigger("pinchstart",g(i,c)),e.bind("touchmove",l).one("touchend",function(b){e.unbind("touchmove",l),a(b.target).trigger("pinchend",g(c,j)),i=c,current=c,j=1,k=!1})})}},a.event.special.pinch=pinch_event,a.mobile.pinch={enabled:!0,min:.1,max:3,factor:4,threshold:.01,interval:50}}(jQuery,this),function(a,b,c,d){a.widget("tizen.splitview",a.mobile.widget,{options:{fixed:!1,dividerVertical:!0,ratio:[],initSelector:":jqmData(role='splitview')"},_create:function(){var c=this,d=c.element,e=c.options,f=d.children(".ui-pane"),g=f.length,h=[],i=[],j=this.element.attr("data-ratio"),k=[0,0],l=null,m=0;if(g!==2){if(g<2)for(m=g;m<2;++m)c._addEmptyPanes();else f.slice(2).remove();f=d.children(".ui-pane"),g=f.length}h[0]=a("<a href='#' class='ui-spliter' aria-label='Drag scroll, double tap and move to adjust split area'></a>").insertAfter(f[0]),i[0]=a("<div class='ui-spliter-bar'></div>").appendTo(h[0]),a("<div class='ui-spliter-handle'></div>").appendTo(i[0]),a.extend(this,{moveTarget:null,moveData:{},spliters:h,spliterBars:i,panes:f,containerSize:k,touchStatus:!1,minPaneWidth:50,savedRatio:[]}),c._bindTouchEvents(),c._convertRatio(j,f.length),d.addClass("ui-splitview ui-direction-"+c._direction(e.dividerVertical)),c._refresh(),a(b).unbind(".splitview").bind("pagechange.splitview resize.splitview",function(b){a(".ui-page-active .ui-splitview").each(function(){a(this).data("splitview")._refresh()})})},_addEmptyPanes:function(){var b=this,c=b.element,d=b.options,e=c.children(".ui-pane"),f=a.support.scrollview?"data-scroll='y'":"",g=a("<div class='ui-pane' "+f+"></div>");f.length&&g.scrollview({direction:"y"}),e.length?e.last().after(g):c.append(g)},_direction:function(a){return a?"horizontal":"vertical"},_isStyleSpecified:function(a){return typeof a!="undefined"&&a.length},_getContainerSize:function(a,b){var c=this,d=c.element,e=c._isStyleSpecified(a),f=c._isStyleSpecified(b);return c.containerSize[0]=e?d.outerWidth(!0):c._parentWidth(),c.containerSize[1]=f?d.outerHeight(!0):c._parentHeight(),!c.containerSize[0]||!c.containerSize[1]?!1:!0},_parentWidth:function(){var c=this.element.parent();return!c&&typeof c=="undefined"&&!c.length?a(b).width():c.width()},_parentHeight:function(){var c=this.element.parent(),d="",e=!1,f=0;while(c&&typeof c!="undefined"&&c.length){if(typeof c[0].style!="undefined"){d=c[0].style.height,e=typeof d!="undefined"&&d.length;if(e){f=c.height();break}}c=c.parent()}return e||(f=a(b).height()),f},_convertRatio:function(b,c){var d=this,e=[],f=0,g=typeof b,h=null,i;for(i=0;i<c;++i)e.push(0);switch(g){case"number":c&&(e[0]=b);break;case"string":h=b.split(","),f=Math.min(h.length,c);for(i=0;i<f;++i)e[i]=parseFloat(h[i]);break;case"object":if(!a.isArray(b))break;f=Math.min(b.length,c);for(i=0;i<f;++i)g=typeof b[i],e[i]=g==="string"?parseFloat(b[i]):g==="number"?b[i]:0}d.options.ratio=e,d._adjustRatio(c)},_adjustRatio:function(a){var b=this,c=b.options.ratio,d=0,e=0,f=0,g=0,h=0,i;if(!a){b.options.ratio=[];return}for(i in c)d+=c[i];if(d!==1){e=1-d,f=e/a;for(i in c)f>=0?(c[i]+=f,e=Math.max(0,e-f)):(h+=f,g=Math.max(h,c[i]*-1),c[i]=Math.max(0,c[i]+g),e=Math.min(0,e-g),h-=g);if(e)if(e>0)c[c.length-1]+=e;else for(i=c.length-1;i>=0;--i){g=Math.max(e,c[i]*-1),c[i]=Math.max(0,c[i]+g),e=Math.min(0,e-g);if(!e)break}b.options.ratio=c}},_setOption:function(b,c){var d=this,e=d.options[b];if(e===c)return;a.Widget.prototype._setOption.apply(this,arguments);switch(b){case"fixed":d._fixed(c);break;case"dividerVertical":d._dividerVertical(c);break;case"ratio":d._ratio(c)}},_subtractDiffWidth:function(a,b){var c=this;return a<=c.minPaneWidth?{width:a,diff:b}:(a+=b,a>=c.minPaneWidth?{width:a,diff:0}:{width:c.minPaneWidth,diff:a-c.minPaneWidth})},_initRatio:function(b,c,d,e){var f=this,g=0,h=[],i=0,j=c.length,k,l;c.each(function(b){var c=a(this);h.push(d?c.width():c.height()),g+=h[b]}),i=e-g;if(!i)return h;if(i>0)h[b?0:j-1]+=i;else if(b)for(l=0;l<j;++l){k=f._subtractDiffWidth(h[l],i),h[l]=k.width,i=k.diff;if(!i)break}else for(l=j-1;l>=0;--l){i=f._subtractDiffWidth(h[l],i),h[l]=k.width,i=k.diff;if(!i)break}g=0;for(l in h)g+=h[l];for(l in f.options.ratio)f.options.ratio[l]=h[l]/g;return h},_horizontalBoundary:function(){var a=this,b=a.element;return b.outerWidth(!0)-b.width()},_verticalBoundary:function(){var a=this,b=a.element;return b.outerHeight(!0)-b.height()},_boundary:function(a){var c=this,d=c.element,e=b.getComputedStyle(d[0],null),f=parseFloat(e["margin"+a]),g=parseFloat(e["border"+a+"Width"]),h=parseFloat(e["padding"+a]);return{margin:f,border:g,padding:h}},_layout:function(b,c){var d=this,e=d.element,f=d.options,g=f.dividerVertical,h=d.panes,i=d.spliters,j=d.spliterBars,k=d.spliterBars.length?a(j[0]):null,l=k?g?k.outerWidth():k.outerHeight():0,m=k?g?k.outerWidth(!0)-k.outerWidth():k.outerHeight(!0)-k.outerHeight():0,n=h.length,o=0,p=l*(n-1),q=d.containerSize[0],r=d.containerSize[1],s=q-d._horizontalBoundary(),t=r-d._verticalBoundary(),u=g?t:s,v=g?s-p:t-p,w=[],x=0,y=null;b=!!b,c=!!c,e.css({"min-width":s,"min-height":t}),b&&(w=d._initRatio(c,h,g,v)),o=v,h.each(function(c){var e=a(this),f=b?w[c]:Math.floor(v*d.options.ratio[c]),i=c?h.eq(c-1):null,j=0,k=0,m=0,p=0;o-=f,c===n-1&&(f=Math.max(Math.min(f,d.minPaneWidth),f+o)),x+=f,i?(j=parseInt(i.css(g?"left":"top"),10),j+=g?i.width():i.height(),j+=l):(p=d._boundary(g?"Left":"Top"),j=p.padding),k=g?f:u,m=g?u:f,e.css({width:k,height:m}),e.css(g?"left":"top",j)}),h.each(function(b){var c=a(this),e=g?c.width():c.height();d.options.ratio[b]=e/x}),a.each(i,function(b){var c=a(this),d=h.eq(b),e=c.children(".ui-spliter-bar"),f=e.children(".ui-spliter-handle"),i=0;g?(i=parseInt(d.css("left"),10)+d.width()-m,c.outerHeight(u).css("left",i)):(i=parseInt(d.css("top"),10)+d.height()-m,c.outerWidth(u).css("top",i)),e.length&&e[g?"outerHeight":"outerWidth"](u),f.length&&f.css(g?"top":"left",(u-l)/2)}),y=e.find(".ui-splitview:first");if(!y.length)return;y=y.data("splitview"),y&&y._refresh()},_bindTouchEvents:function(){var b=this,c=b.element,d=b.panes,e=b.spliters;a.each(e,function(c){var d=a(this);b._bindSpliterTouchEvents.call(b,d)})},_bindSpliterTouchEvents:function(b){var d=this,e=d.element,f=d.options,g=a.support.touch?"touchstart":"mousedown",h=(a.support.touch?"touchmove":"mousemove")+".splitview",i=(a.support.touch?"touchend":"mouseup")+".splitview";b.bind(g,{e:b},function(b){if(d.options.fixed)return;var g=a.support.touch?b.originalEvent.changedTouches[0]:b,j=b.data.e,k=j.prev(),l=j.next(),m=k.find(".ui-splitview:first"),n=l.find(".ui-splitview:first"),o=f.dividerVertical,p=o?a(d.spliterBars[0]).outerWidth():a(d.spliterBars[0]).outerHeight();d.moveTarget=j,d.moveData={spliterWidth:p||0,prevPane:k,nextPane:l,splitviewInPrev:m,splitviewInNext:n,prevPanePos:parseInt(k.css(o?"left":"top"),10)||0,prevPaneWidth:parseInt(k.css(o?"width":"height"),10)||0,nextPanePos:parseInt(l.css(o?"left":"top"),10)||0,nextPaneWidth:parseInt(l.css(o?"width":"height"),10)||0,targetPos:parseInt(j.css(o?"left":"top"),10)||0,pagePos:o?g.pageX:g.pageY},j.addClass("ui-spliter-active"),e.bind(h,function(b){if(!d.touchStatus)return;b.stopPropagation(),d._drag(a.support.touch?b.originalEvent.changedTouches[0]:b)}).bind(i,function(b){b.stopPropagation(),d._stop(a.support.touch?b.originalEvent.changedTouches[0]:b),d.touchStatus=!1,e.unbind(".splitview"),a(c).unbind(".splitview")}),a(c).bind(h+" "+i,function(){e.trigger(i)}),b.preventDefault(),d.touchStatus=!0})},_drag:function(a){if(!this.moveData||typeof this.moveData=="undefined")return;var b=this,c=b.element,d=b.options,e=d.dividerVertical,f=b.moveData,g=b.moveTarget,h=f.prevPane,i=f.nextPane,j=f.splitviewInPrev,k=f.splitviewInNext,l=f.spliterWidth,m=null,n=null,o=null,p=null,q=null,r=e?a.pageX:a.pageY,s=null;m=r-f.pagePos,m>0?m=Math.min(Math.max(f.nextPaneWidth-b.minPaneWidth,0),m):m=Math.max(Math.max(f.prevPaneWidth-b.minPaneWidth,0)*-1,m),o=f.nextPanePos+m,p=Math.max(f.prevPaneWidth+m,0),q=Math.max(f.nextPaneWidth-m,0),n=f.targetPos+m,g.css(e?{left:n}:{top:n}),h.css(e?{width:p}:{height:p}),i.css(e?{width:q,left:o}:{height:q,top:o}),j.length&&(s=j.data("splitview"),s._refresh(!0,!1)),k.length&&(s=k.data("splitview"),s._refresh(!0,!0))},_stop:function(b){if(!this.moveData||!this.moveTarget)return;var c=this,d=c.element,e=c.options,f=c.panes,g=f.length,h=e.dividerVertical,i=c.moveData,j=c.moveTarget,k=i.prevPane,l=i.nextPane,m=i.splitviewInPrev,n=i.splitviewInNext,o=i.spliterWidth,p=o*(g-1),q=null,r=null,s=null,t=null,u=null,v=d.css("display"),w=c.containerSize[0],x=c.containerSize[1],y=w-c._horizontalBoundary(),z=x-c._verticalBoundary(),A=h?y-p:z-p,B=0;j.removeClass("ui-spliter-active"),f.each(function(b){var c=a(this),d=h?c.width():c.height();B+=d}),f.each(function(b){var d=a(this),e=h?d.width():d.height();c.options.ratio[b]=e/B}),c.moveData=null},_fixed:function(b){var c=this,d=c.spliters;a.each(d,function(c){var d=a(this);b?d.addClass("ui-fixed"):d.removeClass("ui-fixed")}),c._layout()},_dividerVertical:function(a){var b=this,c=b.element,d=a,e=null,f=null,g=null,h=null;e=c.children(".ui-pane"),f=c.children(".ui-spliter"),g=f.children(".ui-spliter-bar"),h=g.children(".ui-spliter-handle"),c.removeClass("ui-direction-vertical"),c.removeClass("ui-direction-horizontal"),c.addClass("ui-splitview ui-direction-"+b._direction(d)),e.css({left:"",top:"",width:"",height:""}),f.css({left:"",top:"",width:"",height:""}),g.css({width:"",height:""}),h.css({left:"",top:""}),b._getContainerSize(c[0].style.width,c[0].style.height)&&b._layout()},_ratio:function(a){var b=this,c=b.element,d=c.children(".ui-pane"),e=d.length;b._convertRatio(a,e),b._layout()},_refresh:function(a,b){var c=this,d=c.element;a=!!a,b=!!b,c._getContainerSize(d[0].style.width,d[0].style.height)&&c._layout(a,b)},pane:function(a,b){if(typeof a!="string")return null;var c=this,d=c.element,e=d.children(a),f=null,g=null;if(!e.hasClass("ui-pane"))return null;if(!b)return e.contents();if(e.hasClass("ui-scrollview-clip")){e.scrollview("scrollTo",0,0,0),f=e.children(".ui-scrollview-view");if(!f.length)return null}else f=e;g=b.parent();if(g.length&&g[0]===f[0])return;f.empty().append(b).trigger("create"),f.fadeIn("fast")},maximize:function(a){if(typeof a!="string")return;var b=this,c=b.element,d=b.panes,e=c.children(a);if(!e.hasClass("ui-pane"))return;b.savedRatio=b.options.ratio.slice(),b.options.ratio=[],d.each(function(a){b.options.ratio.push(this===e[0]?1:0)}),b._layout()},restore:function(){var a=this;if(!a.savedRatio.length)return;a.options.ratio=a.savedRatio.slice(),a._adjustRatio(a.panes.length),a._layout()}}),a(c).bind("pagecreate create",function(b){a.tizen.splitview.prototype.enhanceWithin(b.target)})}(jQuery,window,document),function(a,b,c){a.mobile.defaultPageTransition="none",a.mobile.transitionHandlers.depth=a.mobile.transitionHandlers
269 .simultaneous,a.mobile.transitionFallbacks.depth="fade",a.fn.buttonMarkup.defaults.corners=!1,a.mobile.buttonMarkup.hoverDelay=0}(jQuery,this),function(a,b){var c={};a.widget("tizen.extendablelist",a.mobile.widget,{options:{theme:"s",countTheme:"c",headerTheme:"b",dividerTheme:"b",splitIcon:"arrow-r",splitTheme:"b",inset:!1,id:"",extenditems:50,childSelector:" li",dbtable:"",template:"",loadmore:"tmp_load_more",scrollview:!1,initSelector:":jqmData(role='extendablelist')"},_stylerMouseUp:function(){a(this).addClass("ui-btn-up-s"),a(this).removeClass("ui-btn-down-s")},_stylerMouseDown:function(){a(this).addClass("ui-btn-down-s"),a(this).removeClass("ui-btn-up-s")},_stylerMouseOver:function(){a(this).toggleClass("ui-btn-hover-s")},_stylerMouseOut:function(){a(this).toggleClass("ui-btn-hover-s"),a(this).addClass("ui-btn-up-s"),a(this).removeClass("ui-btn-down-s")},_pushData:function(b){var c=this.options,d=this,e=0,f=a("#"+b),g=c.extenditems>d._numItemData-d._lastIndex?d._numItemData-d.lastIndex:c.extenditems,h;for(e=0;e<g;e++)h=f.tmpl(d._itemData(e)),a(c.id).append(a(h).attr("id","li_"+e)),a(c.id+">"+c.childSelector).addClass("ui-btn-up-s").bind("mouseup",d._stylerMouseUp).bind("mousedown",d._stylerMouseDown).bind("mouseover",d._stylerMouseOver).bind("mouseout",d._stylerMouseOut),d._lastIndex+=1;a(c.id).trigger("create")},_loadmore:function(b){var c=b.data,d=c.options,e=0,f=a("#"+d.template),g=d.extenditems>c._numItemData-c._lastIndex?c._numItemData-c._lastIndex:d.extenditems,h,i,j;a("#load_more_message").remove();for(e=0;e<g;e++)h=f.tmpl(c._itemData(c._lastIndex)),a(d.id).append(a(h).attr("id","li_"+c._lastIndex)),c._lastIndex+=1;c._numItemData>c._lastIndex&&(f=a("#"+d.loadmore),i=c._numItemData-c._lastIndex,j=d.extenditems<=i?d.extenditems:i,h=f.tmpl({NUM_MORE_ITEMS:j}),a(d.id).append(a(h).attr("id","load_more_message").css("min-height","37px"))),a(d.id).trigger("create"),a(d.id).extendablelist("refresh")},recreate:function(a){this._create({itemData:function(b){return a[b]},numItemData:a.length})},_initList:function(b){var c=this,d=this.options,e,f,g,h;c._lastIndex<=0&&(c._pushData(d.template),c._numItemData>c._lastIndex?(e=a("#"+d.loadmore),f=c._numItemData-c._lastIndex,g=d.extenditems<=f?d.extenditems:f,h=e.tmpl({NUM_MORE_ITEMS:g}),a(d.id).append(a(h).attr("id","load_more_message").css("min-height","37px")),a("#load_more_message").live("click",c,c._loadmore)):(a("#load_more_message").die(),a("#load_more_message").remove())),d.childSelector==" ul"&&a(d.id+" ul").swipelist(),a(d.id).trigger("create"),c.refresh(!0)},create:function(){var a=this.options;this._create.apply(this,arguments)},_create:function(b){var c=this,d=this.options,e=this.element,f;c.destroy(),a.extend(this,{_itemData:function(a){return null},_numItemData:0,_cacheItemData:function(a,b){},_lastIndex:0}),c.element.addClass(function(a,b){return b+" ui-listview ui-extendable-list-container"+(c.options.inset?" ui-listview-inset ui-corner-all ui-shadow ":"")}),d.id="#"+e.attr("id"),e.data("extenditems")&&(d.extenditems=parseInt(e.data("extenditems"),10)),a(d.id).bind("pagehide",function(b){a(d.id).empty()}),a(".ui-scrollview-clip").size()>0?d.scrollview=!0:d.scrollview=!1;if(b){if(!c._loadData(b))return}else{console.warn("WARNING: The data interface of extendable list is changed. \nOld data interface(data-dbtable) is still supported, but will be removed in next version. \nPlease fix your code soon!");if(!a(d.id).hasClass("elLoadSuccess")){console.warn("No elLoadSuccess class");return}f=e.jqmData("dbtable"),d.dbtable=window[f],d.dbtable||(d.dbtable={}),c._itemData=function(a){return d.dbtable[a]},c._numItemData=d.dbtable.length}e.data("template")&&(d.template=e.data("template"),e.data("swipelist")==1?d.childSelector=" ul":d.shildSelector=" li"),c._initList(b)},_loadData:function(a){var b=this;if(!a.itemData||typeof a.itemData!="function")return!1;b._itemData=a.itemData;if(!a.numItemData)return!1;if(typeof a.numItemData=="function")b._numItemData=a.numItemData();else{if(typeof a.numItemData!="number")return!1;b._numItemData=a.numItemData}return!0},destroy:function(){var b=this.options,c=0,d=0;a(b.id).empty(),a("#load_more_message").die()},_itemApply:function(b,c){var d=c.find(".ui-li-count");d.length&&c.addClass("ui-li-has-count"),d.addClass("ui-btn-up-"+(b.jqmData("counttheme")||this.options.countTheme)+" ui-btn-corner-all"),c.find("h1, h2, h3, h4, h5, h6").addClass("ui-li-heading").end().find("p, dl").addClass("ui-li-desc").end().find(">img:eq(0), .ui-link-inherit>img:eq(0)").addClass("ui-li-thumb").each(function(){c.addClass(a(this).is(".ui-li-icon")?"ui-li-has-icon":"ui-li-has-thumb")}).end().find(".ui-li-aside").each(function(){var b=a(this);b.prependTo(b.parent())})},_removeCorners:function(a,b){var c="ui-corner-top ui-corner-tr ui-corner-tl",d="ui-corner-bottom ui-corner-br ui-corner-bl";a=a.add(a.find(".ui-btn-inner, .ui-li-link-alt, .ui-li-thumb")),b==="top"?a.removeClass(c):b==="bottom"?a.removeClass(d):a.removeClass(c+" "+d)},_refreshCorners:function(a){var b,c,d,e;this.options.inset&&(b=this.element.children("li"),c=a?b.not(".ui-screen-hidden"):b.filter(":visible"),this._removeCorners(b),d=c.first().addClass("ui-corner-top"),d.add(d.find(".ui-btn-inner")).find(".ui-li-link-alt").addClass("ui-corner-tr").end().find(".ui-li-thumb").not(".ui-li-icon").addClass("ui-corner-tl"),e=c.last().addClass("ui-corner-bottom"),e.add(e.find(".ui-btn-inner")).find(".ui-li-link-alt").addClass("ui-corner-br").end().find(".ui-li-thumb").not(".ui-li-icon").addClass("ui-corner-bl"))},refresh:function(b){this.parentPage=this.element.closest(".ui-page"),this._createSubPages();var c=this.options,d=this.element,e=this,f=d.jqmData("dividertheme")||c.dividerTheme,g=d.jqmData("splittheme"),h=d.jqmData("spliticon"),i=d.children("li"),j=a.support.cssPseudoElement||!a.nodeName(d[0],"ol")?0:1,k,l,m,n,o,p,q,r,s,t;j&&d.find(".ui-li-dec").remove();for(s=0,t=i.length;s<t;s++){k=i.eq(s),l="ui-li";if(b||!k.hasClass("ui-li"))m=k.jqmData("theme")||c.theme,n=k.children("a"),n.length?(r=k.jqmData("icon"),k.buttonMarkup({wrapperEls:"div",shadow:!1,corners:!1,iconpos:"right",icon:!1,theme:m}),r!=0&&n.length==1&&k.addClass("ui-li-has-arrow"),n.first().addClass("ui-link-inherit"),n.length>1&&(l+=" ui-li-has-alt",o=n.last(),p=g||o.jqmData("theme")||c.splitTheme,o.appendTo(k).attr("title",o.getEncodedText()).addClass("ui-li-link-alt").empty().buttonMarkup({shadow:!1,corners:!1,theme:m,icon:!1,iconpos:!1}).find(".ui-btn-inner").append(a("<span />").buttonMarkup({shadow:!0,corners:!0,theme:p,iconpos:"notext",icon:h||o.jqmData("icon")||c.splitIcon})))):k.jqmData("role")==="list-divider"?(l+=" ui-li-divider ui-btn ui-bar-"+f,k.attr("role","heading"),j&&(j=1)):l+=" ui-li-static ui-body-"+m;j&&l.indexOf("ui-li-divider")<0&&(q=k.is(".ui-li-static:first")?k:k.find(".ui-link-inherit"),q.addClass("ui-li-jsnumbering").prepend("<span class='ui-li-dec'>"+j++ +". </span>")),k.add(k.children(".ui-btn-inner")).addClass(l),e._itemApply(d,k)}this._refreshCorners(b)},_idStringEscape:function(a){return a.replace(/\W/g,"-")},_createSubPages:function(){var b=this.element,d=b.closest(".ui-page"),e=d.jqmData("url"),f=e||d[0][a.expando],g=b.attr("id"),h=this.options,i="data-"+a.mobile.ns,j=this,k=d.find(":jqmData(role='footer')").jqmData("id"),l,m;typeof c[f]=="undefined"&&(c[f]=-1),g=g||++c[f],a(b.find("li>ul, li>ol").toArray().reverse()).each(function(c){var d=this,f=a(this),j=f.attr("id")||g+"-"+c,m=f.parent(),n,p=n.first().getEncodedText(),q=(e||"")+"&"+a.mobile.subPageUrlKey+"="+j,r=f.jqmData("theme")||h.theme,s=f.jqmData("counttheme")||b.jqmData("counttheme")||h.countTheme,t,u;n=a(f.prevAll().toArray().reverse()),n=n.length?n:a("<span>"+a.trim(m.contents()[0].nodeValue)+"</span>"),l=!0,t=f.detach().wrap("<div "+i+"role='page' "+i+"url='"+q+"' "+i+"theme='"+r+"' "+i+"count-theme='"+s+"'><div "+i+"role='content'></div></div>").parent().before("<div "+i+"role='header' "+i+"theme='"+h.headerTheme+"'><div class='ui-title'>"+p+"</div></div>").after(k?a("<div "+i+"role='footer' "+i+"id='"+k+"'>"):"").parent().appendTo(a.mobile.pageContainer),t.page(),u=m.find("a:first"),u.length||(u=a("<a/>").html(n||p).prependTo(m.empty())),u.attr("href","#"+q)}).extendablelist(),l&&d.is(":jqmData(external-page='true')")&&d.data("page").options.domCache===!1&&(m=function(b,c){var f=c.nextPage,g;c.nextPage&&(g=f.jqmData("url"),g.indexOf(e+"&"+a.mobile.subPageUrlKey)!==0&&(j.childPages().remove(),d.remove()))},d.unbind("pagehide.remove").bind("pagehide.remove",m))},childPages:function(){var b=this.parentPage.jqmData("url");return a(":jqmData(url^='"+b+"&"+a.mobile.subPageUrlKey+"')")}}),a(document).bind("pagecreate create",function(b){a(a.tizen.extendablelist.prototype.options.initSelector,b.target).extendablelist()})}(jQuery),function(a,b){a.widget("tizen.fastscroll",a.mobile.widget,{options:{initSelector:":jqmData(fastscroll)"},_primaryLanguage:null,_secondLanguage:null,_dividerMap:{},_defaultTime:500,_defaultDuration:500,_timer:null,_isFadeOut:!1,_create:function(){var b=this.element,c=this,d,e=b.closest(':jqmData(role="page")'),f;this.scrollview=b.addClass("ui-fastscroll-target").closest(".ui-scrollview-clip"),this.shortcutsContainer=a('<div class="ui-fastscroll" aria-label="Fast scroll bar, double tap to fast scroll mode" tabindex="0"/>'),this.shortcutsList=a('<ul aria-hidden="true"></ul>'),this.scrollview.append(a('<div class="ui-fastscroll-popup"></div>')),d=this.scrollview.find(".ui-fastscroll-popup"),this.shortcutsContainer.append(this.shortcutsList),this.scrollview.append(this.shortcutsContainer),this.lastListItem=b.children().last(),this.scrollview.find(".ui-scrollbar").hide(),this.jumpToDivider=function(b){var d=a(b).position().top,e=c.lastListItem.outerHeight(!0)+c.lastListItem.position().top,f=c.scrollview.height(),g=e-f,h;d=d>g?g:d,d=Math.max(d,0),c.scrollview.scrollview("scrollTo",0,-d),h=c.scrollview.offset()},this.shortcutsList.bind("touchstart mousedown vmousedown touchmove vmousemove vmouseover",function(b){var d=a.mobile.tizen.targetRelativeCoordsFromEvent(b),e=c.shortcutsList.offset();if(c._isFadeOut===!0)return;b.target.tagName.toLowerCase()==="li"&&(d.x+=a(b.target).offset().left-e.left,d.y+=a(b.target).offset().top-e.top),b.target.tagName.toLowerCase()==="span"&&(d.x+=a(b.target).parent().offset().left-e.left,d.y+=a(b.target).parent().offset().top-e.top),c.shortcutsList.find("li").each(function(){var b=a(this);a(b).removeClass("ui-fastscroll-hover").removeClass("ui-fastscroll-hover-down")}),c.shortcutsList.find("li").each(function(){var b=a(this),f=b.offset().left-e.left,g=b.offset().top-e.top,h=f+Math.abs(b.outerWidth(!0)),i=g+Math.abs(b.outerHeight(!0)),j,k,l,m,n;if(d.x>=f&&d.x<=h&&d.y>=g&&d.y<=i){if(b.text()!==".")c._hitItem(b);else{m=b.data("omitSet"),j=(i-g)/m.length;for(n=0;n<m.length;n++)k=g+n*j,l=k+j,d.y>=k&&d.y<=l&&c._hitOmitItem(b,m.charAt(n))}return!1}return!0}),c._setTimer(!1),b.preventDefault(),b.stopPropagation()}).bind("touchend mouseup vmouseup vmouseout",function(){d.hide(),a(".ui-fastscroll-hover").removeClass("ui-fastscroll-hover"),a(".ui-fastscroll-hover-first-item").removeClass("ui-fastscroll-hover-first-item"),a(".ui-fastscroll-hover-down").removeClass("ui-fastscroll-hover-down"),c._setTimer(!0)}),e&&!e.is(":visible")?e.bind("pageshow",function(){c.refresh()}):c.refresh(),b.bind("updatelayout",function(){c.refresh()}),c.scrollview.bind("scrollstart",function(a){c._setTimer(!1)}).bind("scrollstop",function(a){c._setTimer(!0)})},_hitOmitItem:function(b,c){var d=this,e=d.scrollview.find(".ui-fastscroll-popup"),f=d._dividerMap[c];typeof f!="undefined"&&d.jumpToDivider(a(f)),e.text(c).css({marginLeft:-(e.outerWidth()/2),marginTop:-(e.outerHeight()/2),padding:e.css("paddingTop")}).width(e.height()).show(),a(b).addClass("ui-fastscroll-hover"),b.index()===0&&a(b).addClass("ui-fastscroll-hover-first-item"),a(b).siblings().eq(b.index()).addClass("ui-fastscroll-hover-down")},_hitItem:function(b){var c=this,d=c.scrollview.find(".ui-fastscroll-popup"),e=b.text(),f;e==="#"?f=c._dividerMap.number:f=c._dividerMap[e],typeof f!="undefined"&&c.jumpToDivider(a(f)),d.text(e).css({marginLeft:-(d.outerWidth()/2),marginTop:-(d.outerHeight()/2),padding:d.css("paddingTop")}).width(d.height()).show(),a(b).addClass("ui-fastscroll-hover"),b.index()===0&&a(b).addClass("ui-fastscroll-hover-first-item"),a(b).siblings().eq(b.index()).addClass("ui-fastscroll-hover-down")},_focusItem:function(b){var c=this,d=c.scrollview.find(".ui-fastscroll-popup");b.focusin(function(a){c.shortcutsList.attr("aria-hidden",!1),c._hitItem(b),c._setTimer(!1)}).focusout(function(b){c.shortcutsList.attr("aria-hidden",!0),d.hide(),a(".ui-fastscroll-hover").removeClass("ui-fastscroll-hover"),a(".ui-fastscroll-hover-first-item").removeClass("ui-fastscroll-hover-first-item"),a(".ui-fastscroll-hover-down").removeClass("ui-fastscroll-hover-down"),c._setTimer(!0)})},_contentHeight:function(){var b=this,c=a(".ui-scrollview-clip"),d=null,e=null,f=0,g=a(window).height();return c.hasClass("ui-content")?(f=parseInt(c.css("padding-top"),10),g-=f||0,f=parseInt(c.css("padding-bottom"),10),g-=f||0,d=c.siblings(".ui-header:visible"),e=c.siblings(".ui-footer:visible"),d&&(d.outerHeight(!0)===null?g-=a(".ui-header").outerHeight()||0:g-=d.outerHeight(!0)),e&&(g-=e.outerHeight(!0))):g=c.height(),g},_omit:function(a,b){var c=parseInt((b-1)/2,10),d=a-b,e=[],f=[],g,h,i,j;if(b<3||a<=b)return;d>=c?(i=2,h=1,g=c):(i=b/(d+1),h=i,g=d);for(j=0;j<g;j++)e.push(parseInt(h,10)),h+=i;for(j=0;j<b;j++)f.push(1);for(j=0;j<d;j++)f[e[j%c]]++;return f},_createDividerMap:function(){var b=this,c=b._primaryLanguage?b._primaryLanguage.replace(/,/g,""):null,d=b._secondLanguage?b._secondLanguage.replace(/,/g,""):null,e="0123456789",f=b.element.find(".ui-li-divider"),g={},h,i,j,k;h=function(b,c){a(c).text()===j&&(g[j]=c)},i=function(b,d){c+=a(d).text()},c===null&&(c="",f.each(i));for(k=0;k<c.length;k++)j=c.charAt(k),f.each(h);if(d!==null)for(k=0;k<d.length;k++)j=d.charAt(k),f.each(h);f.each(function(b,c){if(e.search(a(c).text())!==-1)return g.number=c,!1}),b._dividerMap=g},_setTimer:function(a){var b=this;a===!0?b._timer=setTimeout(function(){b._isFadeOut=!0,b.shortcutsContainer.fadeOut(b._defaultDuration,function(){b._isFadeOut=!1})},b._defaultTime):(b._timer!==null&&clearTimeout(b._timer),b.shortcutsContainer.show())},indexString:function(a){var b=this,c=[];if(typeof a=="undefined")return b._primaryLanguage+":"+b._secondLanguage;c=a.split(":"),b._primaryLanguage=c[0],c.length===2&&(b._secondLanguage=c[1])},refresh:function(){var b=this,c=b._primaryLanguage?b._primaryLanguage.replace(/,/g,""):null,d=b._secondLanguage?b._secondLanguage.replace(/,/g,""):null,e=b._contentHeight(),f=a('<li tabindex="0" aria-label="double to move Number list"><span aria-hidden="true">#</span><span aria-label="Number"/></li>'),g=0,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D;h=function(b,d){c+=a(d).text()},i=function(a,b){var d,e="";for(d=0;d<b;d++)e+=c[a+d];return e},j=function(c){var d=a(this).text(),e=b._dividerMap[d];typeof e!="undefined"&&a(e).next().focus()},b._createDividerMap(),b.shortcutsList.find("li").remove(),u=b.element.find(".ui-li-divider"),v=b.element.find("li").not(".ui-li-divider"),u=u.filter(":visible"),v=v.filter(":visible");if(u.length<2){b.shortcutsList.hide();return}b.shortcutsList.show(),b.lastListItem=v.last(),b.shortcutsList.append(f),b._focusItem(f),c===null&&(c="",u.each(h)),s=parseInt(f.css("padding"),10),r=f.height()+s*2,p=parseInt(e/r-1,10),q=c.length,p=d?p-2:p;if(p<3){f.remove();return}t=b._omit(q,p);for(D=0;D<c.length;D++)y=c.charAt(D),m=a('<li tabindex="0" aria-label="double to move '+y+' list">'+y+"</li>"),b._focusItem(m),typeof t!="undefined"&&t[g]>1?(m=a("<li>.</li>"),m.data("omitSet",i(D,t[g])),D+=t[g]-1):m.bind("vclick",j),f.before(m),g++;if(d!==null){z=d.length-1,A=[],A.push(d.charAt(0)),A.push(d.charAt(z));for(D=0;D<A.length;D++)y=A[D],m=a('<li tabindex="0" aria-label="double to move '+y+' list">'+y+"</li>"),b._focusItem(m),m.bind("vclick",j),f.before(m)}k=b.shortcutsContainer.outerHeight(),w=e-k,l=b.shortcutsList.children(),C=parseInt(w/l.length,10),x=w-l.length*C,w>0&&l.each(function(b,c){B=a(c).height()+C,x!==0&&(B+=1,x-=1),a(c).css({height:B,lineHeight:B+"px"})}),n=u.first().position().top,b.shortcutsContainer.css("top",n),o=n+b.shortcutsContainer.outerHeight()+"px",b.scrollview.css("min-height",o),b._setTimer(!1),b._setTimer(!0)}}),a(document).bind("pagecreate create",function(b){a(a.tizen.fastscroll.prototype.options.initSelector,b.target).not(":jqmData(role='none'), :jqmData(role='nojs')").fastscroll()}),a(window).bind("resize orientationchange",function(b){a(".ui-page-active .ui-fastscroll-target").fastscroll("refresh")})}(jQuery),function(a,b,c,d){function e(a,b){var c=a%b;return c<0&&(c=b+c),c}function f(a,b,c){var d="translate3d( "+b+","+c+", 0px)";a.css({"-ms-transform":d,"-o-transform":d,"-moz-transform":d,"-webkit-transform":d,transform:d})}function g(b){this.options=a.extend({},b),this.easing="easeOutQuad",this.reset()}function i(){return Date.now()}var h={scrolling:0,done:1};a.extend(g.prototype,{start:function(a,b,c){this.state=b!=0?h.scrolling:h.done,this.pos=a,this.speed=b,this.duration=c,this.fromPos=0,this.toPos=0,this.startTime=i()},reset:function(){this.state=h.done,this.pos=0,this.speed=0,this.duration=0},update:function(){var b=this.state,c,d,e,f;return b==h.done?this.pos:(c=this.duration,d=i()-this.startTime,d=d>c?c:d,e=this.speed*(1-a.easing[this.easing](d/c,d,0,1,c)),f=this.pos+e,this.pos=f,d>=c&&(this.state=h.done),this.pos)},done:function(){return this.state==h.done},getPosition:function(){return this.pos}}),jQuery.widget("mobile.circularview",jQuery.mobile.widget,{options:{fps:60,scrollDuration:2e3,moveThreshold:10,moveIntervalThreshold:150,startEventName:"scrollstart",updateEventName:"scrollupdate",stopEventName:"scrollstop",eventType:a.support.touch?"touch":"mouse",delayedClickSelector:"a, .ui-btn",delayedClickEnabled:!1},_makePositioned:function(a){a.css("position")=="static"&&a.css("position","relative")},_create:function(){var b=this;this._items=a(this.element).jqmData("list"),this._$clip=a(this.element).addClass("ui-scrollview-clip"),this._$clip.wrapInner('<div class="ui-scrollview-view"></div>'),this._$view=a(".ui-scrollview-view",this._$clip),this._$list=a("ul",this._$clip),this._$clip.css("overflow","hidden"),this._makePositioned(this._$clip),this._$view.css("overflow","hidden"),this._tracker=new g(this.options),this._timerInterval=1e3/this.options.fps,this._timerID=0,this._timerCB=function(){b._handleMomentumScroll()},this.refresh(),this._addBehaviors()},reflow:function(){var a=this.getScrollPosition();this.refresh(),this.scrollTo(a.x,a.y)},refresh:function(){var c;this._$clip.width(a(b).width()),this._clipWidth=this._$clip.width(),this._$list.empty(),this._$list.append(this._items[0]),this._itemWidth=a(this._items[0]).outerWidth(),a(this._items[0]).detach(),c=this._clipWidth/this._itemWidth,c=Math.ceil(c*10)/10,this._itemsPerView=parseInt(c,10);while(this._itemsPerView+1>this._items.length)a.merge(this._items,a(this._items).clone());this._rx=-this._itemWidth,this._sx=-this._itemWidth,this._setItems()},_startMScroll:function(a,b){this._stopMScroll();var c=!1,d=this.options.scrollDuration,e=this._tracker,f=this._clipWidth,g=this._viewWidth;this._$clip.trigger(this.options.startEventName),e.start(this._rx,a,d,g>f?-(g-f):0,0),c=!e.done(),c?this._timerID=setTimeout(this._timerCB,this._timerInterval):this._stopMScroll()},_stopMScroll:function(){this._timerID&&(this._$clip.trigger(this.options.stopEventName),clearTimeout(this._timerID)),this._timerID=0,this._tracker&&this._tracker.reset()},_handleMomentumScroll:function(){var a=!1,b=this._$view,c=0,d=0,e=this._tracker;e&&(e.update(),c=e.getPosition(),a=!e.done()),this._setScrollPosition(c,d),this._rx=c,this._$clip.trigger(this.options.updateEventName,[{x:c,y:d}]),a?this._timerID=setTimeout(this._timerCB,this._timerInterval):this._stopMScroll()},_setItems:function(){var a,b;for(a=-1;a<this._itemsPerView+1;a++)b=this._items[e(a,this._items.length)],this._$list.append(b);f(this._$view,this._sx+"px",0),this._$view.width(this._itemWidth*(this._itemsPerView+2)),this._viewWidth=this._$view.width()},_setScrollPosition:function(a,b){var c=this._sx,d=a-c,g=parseInt(d/this._itemWidth,10),h,i,j;if(g>0)for(h=0;h<g;h++)this._$list.children().last().detach(),i=-parseInt(c/this._itemWidth+h+3,10),j=this._items[e(i,this._items.length)],this._$list.prepend(j);else if(g<0)for(h=0;h>g;h--)this._$list.children().first().detach(),i=this._itemsPerView-parseInt(c/this._itemWidth+h,10),j=this._items[e(i,this._items.length)],this._$list.append(j);this._sx+=g*this._itemWidth,f(this._$view,a-this._sx-this._itemWidth+"px",0)},_enableTracking:function(){a(c).bind(this._dragMoveEvt,this._dragMoveCB),a(c).bind(this._dragStopEvt,this._dragStopCB)},_disableTracking:function(){a(c).unbind(this._dragMoveEvt,this._dragMoveCB),a(c).unbind(this._dragStopEvt,this._dragStopCB)},_getScrollHierarchy:function(){var b=[],c;return this._$clip.parents(".ui-scrollview-clip").each(function(){c=a(this).jqmData("circulaview"),c&&b.unshift(c)}),b},centerTo:function(b,c){var d,e;for(d=0;d<this._items.length;d++)if(a(this._items[d]).is(b)){e=-(d*this._itemWidth-this._clipWidth/2+this._itemWidth*1.5),this.scrollTo(e+this._itemWidth,0),this.scrollTo(e,0,c);return}},scrollTo:function(b,c,d){this._stopMScroll();if(!d){this._setScrollPosition(b,c),this._rx=b;return}var e=this,f=i(),g=a.easing.easeOutQuad,h=this._rx,j=0,k=b-h,l=0,m,n,o;this._rx=b,m=function(){n=i()-f,n>=d?(e._timerID=0,e._setScrollPosition(b,c),e._$clip.trigger("scrollend")):(o=g(n/d,n,0,1,d),e._setScrollPosition(h+k*o,j+l*o),e._timerID=setTimeout(m,e._timerInterval))},this._timerID=setTimeout(m,this._timerInterval)},getScrollPosition:function(){return{x:-this._rx,y:0}},_handleDragStart:function(b,c,d){a.each(this._getScrollHierarchy(),function(a,b){b._stopMScroll()}),this._stopMScroll(),this.options.delayedClickEnabled&&(this._$clickEle=a(b.target).closest(this.options.delayedClickSelector)),this._lastX=c,this._lastY=d,this._speedX=0,this._speedY=0,this._didDrag=!1,this._lastMove=0,this._enableTracking(),this._ox=c,this._nx=this._rx,(this.options.eventType=="mouse"||this.options.delayedClickEnabled)&&b.preventDefault(),b.stopPropagation()},_handleDragMove:function(a,b,c){this._lastMove=i();var d=b-this._lastX,e=c-this._lastY;return this._speedX=d,this._speedY=0,this._didDrag=!0,this._lastX=b,this._lastY=c,this._mx=b-this._ox,this._setScrollPosition(this._nx+this._mx,0),!1},_handleDragStop:function(a){var b=this._lastMove,c=i(),e=b&&c-b<=this.options.moveIntervalThreshold,f=this._tracker&&this._speedX&&e?this._speedX:0,g=0;return this._rx=this._mx?this._nx+this._mx:this._rx,f&&this._startMScroll(f,g),this._disableTracking(),!this._didDrag&&this.options.delayedClickEnabled&&this._$clickEle.length&&this._$clickEle.trigger("mousedown").trigger("mouseup").trigger("click"),this._didDrag&&(a.preventDefault(),a.stopPropagation()),this._didDrag?!1:d},_addBehaviors:function(){var a=this;this.options.eventType==="mouse"?(this._dragStartEvt="mousedown",this._dragStartCB=function(b){return a._handleDragStart(b,b.clientX,b.clientY)},this._dragMoveEvt="mousemove",this._dragMoveCB=function(b){return a._handleDragMove(b,b.clientX,b.clientY)},this._dragStopEvt="mouseup",this._dragStopCB=function(b){return a._handleDragStop(b)},this._$view.bind("vclick",function(b){return!a._didDrag})):(this._dragStartEvt="touchstart",this._dragStartCB=function(b){var c=b.originalEvent.targetTouches[0];return a._handleDragStart(b,c.pageX,c.pageY)},this._dragMoveEvt="touchmove",this._dragMoveCB=function(b){var c=b.originalEvent.targetTouches[0];return a._handleDragMove(b,c.pageX,c.pageY)},this._dragStopEvt="touchend",this._dragStopCB=function(b){return a._handleDragStop(b)}),this._$view.bind(this._dragStartEvt,this._dragStartCB)}}),a(c).bind("pagecreate create",function(b){a(a.mobile.circularview.prototype.options.initSelector,b.target).circularview()})}(jQuery,window,document),function(a,b,c,d){a.widget("tizen.multimediaview",a.mobile.widget,{options:{theme:null,controls:!0,fullScreen:!1,initSelector:"video, audio"},_create:function(){var b=this,c=b.element,d=c[0],e=d.nodeName==="VIDEO",f=b.options,g=a.mobile.getInheritedTheme(c,"s"),h=f.theme||g,i=d.style.getPropertyValue("width")||"",j=a("<div class='ui-multimediaview-wrap ui-multimediaview-"+h+"'>"),k=null;a.extend(this,{role:null,controlTimer:null,isVolumeHide:!0,backupView:null,_reserveVolume:-1,_isVideo:e}),c.addClass("ui-multimediaview"),k=b._createControl(),k.hide(),k.find(".ui-button").each(function(b){a(this).buttonMarkup({corners:!0,theme:h,shadow:!0})}),c.wrap(j).after(k),e?k.addClass("ui-multimediaview-video"):(b.width(i),b.options.fullScreen=!1),f.controls&&c.attr("controls")&&c.removeAttr("controls"),b._addEvent()},_resize:function(){this._resizeFullscreen(this.options.fullScreen),this._resizeControl(),this._updateSeekBar(),this._updateVolumeState()},_resizeControl:function(){var a=this,b=a.element,c=b[0],d=a._isVideo,e=b.parent(".ui-multimediaview-wrap"),f=e.find(".ui-multimediaview-control"),g=f.find(".ui-button"),h=f.find(".ui-playpausebutton"),i=f.find(".ui-seekbar"),j=f.find(".ui-durationlabel"),k=f.find(".ui-timestamplabel"),l=f.find(".ui-volumecontrol"),m=l.find(".ui-volumebar"),n=d?b.width():e.width(),o=d?b.height():f.height(),p=b.offset(),q=f.height(),r=0,s=null;f&&(d&&(s=f.offset(),s.left=p.left,s.top=p.top+o-q,f.offset(s)),f.width(n)),i&&(r=f.width()-g.outerWidth(!0)*g.length,r-=(parseInt(g.eq(0).css("margin-left"),10)+parseInt(g.eq(0).css("margin-right"),10))*g.length,a.isVolumeHide||(r-=l.outerWidth(!0)),i.width(r)),j&&!isNaN(c.duration)&&j.find("p").text(a._convertTimeFormat(c.duration)),c.autoplay&&c.paused===!1&&h.removeClass("ui-play-icon").addClass("ui-pause-icon"),i.width()<m.width()+k.width()+j.width()?j.hide():j.show()},_resizeFullscreen:function(b){if(!this._isVideo)return;var d=this,e=d.element,f=e[0],g=e.parent(".ui-multimediaview-wrap"),h=g.find(".ui-multimediaview-control"),i=h.find(".ui-fullscreenbutton"),j=a(".ui-page-active"),k=h.find(".ui-playpausebutton"),l=h.find(".ui-timestamplabel"),m=h.find(".ui-seekbar"),n=m.find(".ui-duration"),o=m.find(".ui-currenttime"),p=a("body")[0],q=j.children(".ui-header"),r=j.children(".ui-footer"),s=0,t=0;if(b)d.backupView||(d.backupView={width:f.style.getPropertyValue("width")||"",height:f.style.getPropertyValue("height")||"",position:e.css("position"),zindex:e.css("z-index"),wrapHeight:g[0].style.getPropertyValue("height")||""}),s=p.clientWidth,t=p.clientHeight-1,q.hide(),r.hide(),e.parents().each(function(b){var c=a(this);c.addClass("ui-fullscreen-parents").siblings().addClass("ui-multimediaview-siblings-off")}),i.removeClass("ui-fullscreen-on").addClass("ui-fullscreen-off"),g.height(t),e.width(s).height(t);else{if(!d.backupView)return;q.show(),r.show(),e.parents().each(function(b){var c=a(this);c.removeClass("ui-fullscreen-parents").siblings().removeClass("ui-multimediaview-siblings-off")}),i.removeClass("ui-fullscreen-off").addClass("ui-fullscreen-on"),g.css("height",d.backupView.wrapHeight),e.css({width:d.backupView.width,height:d.backupView.height,position:d.backupView.position,"z-index":d.backupView.zindex}),d.backupView=null,a(c).trigger("throttledresize")}},_addEvent:function(){var c=this,d=c.element,e=c.options,f=d[0],g=c._isVideo,h=d.parent(".ui-multimediaview-wrap").find(".ui-multimediaview-control"),i=h.find(".ui-playpausebutton"),j=h.find(".ui-timestamplabel"),k=h.find(".ui-durationlabel"),l=h.find(".ui-volumebutton"),m=h.find(".ui-volumecontrol"),n=m.find(".ui-volumebar"),o=m.find(".ui-guide"),p=m.find(".ui-handle"),q=h.find(".ui-fullscreenbutton"),r=h.find(".ui-seekbar"),s=r.find(".ui-duration"),t=r.find(".ui-currenttime"),u=a(b);d.bind("loadedmetadata.multimediaview",function(a){isNaN(f.duration)||k.find("p").text(c._convertTimeFormat(f.duration)),c._resize()}).bind("timeupdate.multimediaview",function(a){c._updateSeekBar()}).bind("play.multimediaview",function(a){i.removeClass("ui-play-icon").addClass("ui-pause-icon")}).bind("pause.multimediaview",function(a){i.removeClass("ui-pause-icon").addClass("ui-play-icon")}).bind("ended.multimediaview",function(a){(typeof f.loop=="undefined"||f.loop==="")&&c.stop()}).bind("volumechange.multimediaview",function(a){f.muted&&f.volume>.1?(l.removeClass("ui-volume-icon").addClass("ui-mute-icon"),c._reserveVolume=f.volume,f.volume=0):c._reserveVolume!==-1&&!f.muted?(l.removeClass("ui-mute-icon").addClass("ui-volume-icon"),f.volume=c._reserveVolume,c._reserveVolume=-1):f.volume<.1?l.removeClass("ui-volume-icon").addClass("ui-mute-icon"):l.removeClass("ui-mute-icon").addClass("ui-volume-icon"),c.isVolumeHide||c._updateVolumeState()}).bind("durationchange.multimediaview",function(a){isNaN(f.duration)||k.find("p").text(c._convertTimeFormat(f.duration)),c._resize()}).bind("click.multimediaview",function(a){if(!c.options.controls)return;h.fadeToggle("fast"),c._resize()}).bind("multimediaviewinit",function(a){e.controls&&h.show(),c._resize()}),i.bind("click.multimediaview",function(){c._endTimer(),f.paused?f.play():f.pause(),g&&c._startTimer()}),q.bind("click.multimediaview",function(a){a.preventDefault(),c.fullScreen(!c.options.fullScreen),c._resize(),c._endTimer(),a.stopPropagation()}),r.bind("vmousedown.multimediaview",function(a){var b=a.clientX,d=f.duration,e=s.offset(),g=s.width(),h=(b-e.left)/g,i=d*h;if(!f.played.length)return;f.currentTime=i,c._endTimer(),a.preventDefault(),u.bind("vmousemove.multimediaview",function(a){var b=a.clientX,c=(b-e.left)/g;f.currentTime=d*c,a.preventDefault()}).bind("vmouseup.multimediaview",function(){u.unbind("vmousemove.multimediaview vmouseup.multimediaview"),f.paused?f.pause():f.play()})}),l.bind("click.multimediaview",function(){if(c.isVolumeHide){var a=c.element,b=f.volume;c.isVolumeHide=!1,m.fadeIn("fast",function(){c._updateVolumeState(),c._updateSeekBar()}),c._resize()}else c.isVolumeHide=!0,m.fadeOut("fast",function(){c._resize()})}),n.bind("vmousedown.multimediaview",function(a){var b=a.clientX,d=o.offset().left,e=o.width(),f=d+e,g=p.offset(),h=(b-d)/e,i=(b-d)/e;c._endTimer(),c._setVolume(i.toFixed(2)),a.preventDefault(),u.bind("vmousemove.multimediaview",function(a){var b=a.clientX,f=(b-d)/e;c._setVolume(f.toFixed(2)),a.preventDefault()}).bind("vmouseup.multimediaview",function(){u.unbind("vmousemove.multimediaview vmouseup.multimediaview")})})},_removeEvent:function(){var a=this.element,b=a.parent(".ui-multimediaview-wrap").find(".ui-multimediaview-control"),c=b.find(".ui-playpausebutton"),d=b.find(".ui-fullscreenbutton"),e=b.find(".ui-seekbar"),f=b.find(".ui-volumecontrol"),g=f.find(".ui-volumebar"),h=f.find(".ui-handle");a.unbind(".multimediaview"),c.unbind(".multimediaview"),d.unbind(".multimediaview"),e.unbind(".multimediaview"),g.unbind(".multimediaview"),h.unbind(".multimediaview")},_createControl:function(){var b=this.element,c=b[0],d=a("<span></span>").addClass("ui-multimediaview-control"),e=a("<span></span>").addClass("ui-playpausebutton ui-button ui-play-icon"),f=a("<span></span>").addClass("ui-seekbar ui-multimediaview-bar"),g=a("<span><p>00:00:00</p></span>").addClass("ui-timestamplabel"),h=a("<span><p>00:00:00</p></span>").addClass("ui-durationlabel"),i=a("<span></span>").addClass("ui-volumebutton ui-button"),j=a("<span></span>").addClass("ui-volumecontrol"),k=a("<div></div>").addClass("ui-volumebar ui-multimediaview-bar"),l=a("<span></span>").addClass("ui-guide ui-multimediaview-bar-bg"),m=a("<span></span>").addClass("ui-value ui-multimediaview-bar-highlight"),n=a("<span></span>").addClass("ui-handle"),o=a("<span></span>").addClass("ui-fullscreenbutton ui-button"),p=a("<span></span>").addClass("ui-duration ui-multimediaview-bar-bg"),q=a("<span></span>").addClass("ui-currenttime ui-multimediaview-bar-highlight");return f.append(p).append(q).append(h).append(g),i.addClass(c.muted?"ui-mute-icon":"ui-volume-icon"),k.append(l).append(m).append(n),j.append(k),d.append(e).append(f).append(j).append(i),this._isVideo&&(a(o).addClass("ui-fullscreen-on"),d.append(o)),j.hide(),d},_startTimer:function(a){this._endTimer(),a||(a=3e3);var b=this,c=b.element,d=c.parent(".ui-multimediaview-wrap").find(".ui-multimediaview-control"),e=d.find(".ui-volumecontrol");b.controlTimer=setTimeout(function(){b.isVolumeHide=!0,b.controlTimer=null,e.hide(),d.fadeOut("fast")},a)},_endTimer:function(){this.controlTimer&&(clearTimeout(this.controlTimer),this.controlTimer=null)},_convertTimeFormat:function(b){if(!a.isNumeric(b))return"Playback Error";var c=parseInt(b%60,10).toString(),d=parseInt(b/60%60,10).toString(),e=parseInt(b/3600,10).toString(),f=(e.length<2?"0"+e:e)+":"+(d.length<2?"0"+d:d)+":"+(c.length<2?"0"+c:c);return f},
270 _updateSeekBar:function(a){var b=this.element,c=b[0],d=c.duration,e=b.parent(".ui-multimediaview-wrap").find(".ui-multimediaview-control"),f=e.find(".ui-seekbar"),g=f.find(".ui-duration"),h=f.find(".ui-currenttime"),i=e.find(".ui-timestamplabel"),j=g.offset(),k=g.width(),l=g.height(),m=0;typeof a=="undefined"&&(a=c.currentTime),m=parseInt(a/d*k,10),g.offset(j),h.offset(j).width(m),i.find("p").text(this._convertTimeFormat(a))},_updateVolumeState:function(){var a=this.element,b=a.parent(".ui-multimediaview-wrap").find(".ui-multimediaview-control"),c=b.find(".ui-volumecontrol"),d=b.find(".ui-volumebutton"),e=c.find(".ui-volumebar"),f=c.find(".ui-guide"),g=c.find(".ui-value"),h=c.find(".ui-handle"),i=h.width(),j=h.height(),k=f.height(),l=f.width(),m=0,n=0,o=0,p=null,q=a[0].volume;m=parseInt(f.offset().top,10),n=parseInt(f.offset().left,10),o=n,p=h.offset(),p.top=m-parseInt((j-k)/2,10),p.left=o+parseInt(l*q,10)-parseInt(i/2,10),h.offset(p),g.offset(f.offset()).width(parseInt(l*q,10))},_setVolume:function(a){var b=this.element[0];if(a<0||a>1)return;b.volume=a},width:function(a){if(this.options.fullScreen)return;var b=this.element,c=b.parent(".ui-multimediaview-wrap");if(arguments.length===0)return b.width();this._isVideo||c.width(a),b.width(a),this._resize()},height:function(a){if(!this._isVideo||this.options.fullScreen)return;var b=this.element;if(arguments.length===0)return b.height();b.height(a),this._resize()},fullScreen:function(a){if(!this._isVideo)return;var b=this.element,c=this.options;if(arguments.length===0)return c.fullScreen;b.parents(".ui-scrollview-clip").scrollview("scrollTo",0,0),this.options.fullScreen=a,this._resize()},refresh:function(){this._resize()}}),a(b).bind("pagecreate create",function(b){a.tizen.multimediaview.prototype.enhanceWithin(b.target)}).bind("pagechange",function(b){a(b.target).find(".ui-multimediaview").each(function(){var b=a(this),c=b[0];c.autoplay&&c.play(),b.multimediaview("refresh")})}).bind("pagebeforechange",function(b){a(b.target).find(".ui-multimediaview").each(function(){var b=a(this),c=b[0],d=b.multimediaview("fullScreen");d&&b.multimediaview("fullScreen",!d),c.played.length!==0&&c.pause()})}),a(c).bind("resize orientationchange",function(b){a(".ui-page-active").find(".ui-multimediaview").multimediaview("refresh")})}(jQuery,document,window),ensureNS("jQuery.mobile.tizen"),function(){jQuery.extend(jQuery.mobile.tizen,{disableSelection:function(a){return this.enableSelection($(a).find("*").not('input, [type="text"], textarea'),"none"),!0},enableSelection:function(a,b){var c;switch(b){case"text":case"auto":case"none":c=b;break;default:c="auto"}return $(a).css({"user-select":c,"-moz-user-select":c,"-webkit-user-select":c,"-o-user-select":c,"-ms-transform":c})},disableContextMenu:function(a){var b=this;$(a).find("*").each(function(){$(this).get(0).tagName!=="INPUT"&&$(this).attr("type")!=="text"&&$(this).get(0).tagName!=="TEXTAREA"&&b._disableContextMenu(this)})},_disableContextMenu:function(a){$(a).each(function(){$(this).bind("contextmenu",function(a){return!1})})},enableContextMenu:function(a){$(a).each(function(){$(this).unbind("contextmenu")})},documentRelativeCoordsFromEvent:function(a){var b=a?a:window.event,c={x:b.clientX,y:b.clientY},d={x:b.pageX,y:b.pageY},e=0,f=0;b.type.match(/^touch/)&&(d={x:b.originalEvent.targetTouches[0].pageX,y:b.originalEvent.targetTouches[0].pageY},c={x:b.originalEvent.targetTouches[0].clientX,y:b.originalEvent.targetTouches[0].clientY});if(d.x||d.y)e=d.x,f=d.y;else if(c.x||c.y)e=c.x+document.body.scrollLeft+document.documentElement.scrollLeft,f=c.y+document.body.scrollTop+document.documentElement.scrollTop;return{x:e,y:f}},targetRelativeCoordsFromEvent:function(a){var b={x:a.offsetX,y:a.offsetY};if(b.x===undefined||isNaN(b.x)||b.y===undefined||isNaN(b.y)){var c=$(a.target).offset();b=$.mobile.tizen.documentRelativeCoordsFromEvent(a),b.x-=c.left,b.y-=c.top}return b}})}(),function(a,b,c,d){function e(a,b){var c=a%b;return c<0&&(c=b+c),c}function f(b){this.options=a.extend({},b),this.easing="easeOutQuad",this.reset()}function l(){return Date.now()}var g={scrolling:0,done:1},h=0,i=1,j=-1,k=/src\s*=\s*[\"\'][\w\/.]+.[A-z]+[\"\']/;a.extend(f.prototype,{start:function(a,b,c){this.state=b!==0?g.scrolling:g.done,this.pos=a,this.speed=b,this.duration=c,this.fromPos=0,this.toPos=0,this.startTime=l()},reset:function(){this.state=g.done,this.pos=0,this.speed=0,this.duration=0},update:function(){var b=this.state,c,d,e,f;return b==g.done?this.pos:(c=this.duration,d=l()-this.startTime,d=d>c?c:d,e=this.speed*(1-a.easing[this.easing](d/c,d,0,1,c)),f=this.pos+e/2,this.pos=f,d>=c&&(this.state=g.done),this.pos)},done:function(){return this.state==g.done},getPosition:function(){return this.pos}}),jQuery.widget("mobile.virtualgrid",jQuery.mobile.widget,{options:{template:"",direction:"y",rotation:!1},create:function(){this._create.apply(this,arguments)},_create:function(b){a.extend(this,{_$view:null,_$clip:null,_$rows:null,_tracker:null,_viewSize:0,_clipSize:0,_cellSize:d,_currentItemCount:0,_itemCount:1,_inheritedSize:null,_timerInterval:0,_timerID:0,_timerCB:null,_lastMove:null,_itemData:function(a){return null},_numItemData:0,_cacheItemData:function(a,b){},_totalRowCnt:0,_templateText:null,_maxViewSize:0,_modifyViewPos:0,_maxSizeExceptClip:0,_maxSize:0,_direction:!1,_didDrag:!0,_reservedPos:0,_scalableSize:0,_eventPos:0,_nextPos:0,_movePos:0,_lastY:0,_speedY:0,_lastX:0,_speedX:0,_rowsPerView:0,_fragment:null,_filterRatio:.9,_overflowStartPos:0,_overflowDir:0,_overflowMaxDragDist:100});var e=this,f=a(e.element),g=e.options,h=null;if(!b)return;if(!e._loadData(b))return;e._fragment=c.createDocumentFragment(),e._inheritedSize=e._getinheritedSize(e.element),e._direction=g.direction==="x"?!0:!1,e._$clip=f.addClass("ui-scrollview-clip").addClass("ui-virtualgrid-view"),h=a(c.createElement("div")).addClass("ui-scrollview-view"),e._clipSize=e._calculateClipSize(),e._$clip.append(h),e._$view=h,e._$clip.css("overflow","hidden"),e._$view.css("overflow","hidden"),e._scrollView=a.tizen.scrollview.prototype,e._initScrollView(),e._createTracker(),e._makePositioned(e._$clip),e._timerInterval=1e3/e.options.fps,e._timerID=0,e._timerCB=function(){e._handleMomentumScroll()},f.closest(".ui-content").addClass("ui-virtualgrid-content").css("overflow","hidden"),e._addBehaviors(),e._currentItemCount=0,e._createOverflowArea(),e._createScrollBar(),e.refresh()},_loadData:function(a){var b=this;if(!a.itemData||typeof a.itemData!="function")return!1;b._itemData=a.itemData;if(!a.numItemData)return!1;if(typeof a.numItemData=="function")b._numItemData=a.numItemData();else{if(typeof a.numItemData!="number")return!1;b._numItemData=a.numItemData}return b._getObjectNames(b._itemData(0)),!0},_initLayout:function(){var a=this,b=a.options,c,d;for(c=-1;c<a._rowsPerView+1;c+=1)d=a._$rows[e(c,a._$rows.length)],a._$view.append(d);a._setElementTransform(-a._cellSize),a._replaceRow(a._$view[0].firstChild,a._totalRowCnt-1),b.rotation&&a._rowsPerView>=a._totalRowCnt&&a._replaceRow(a._$view[0].lastChild,0),a._setViewSize()},_setViewSize:function(){var a=this,b=0,c=0;a._direction?(c=a._cellSize*(a._rowsPerView+2),c=parseInt(c,10)+1,a._$view.width(c),a._viewSize=a._$view.width()):(a._$view.height(a._cellSize*(a._rowsPerView+2)),a._$clip.height(a._clipSize),a._viewSize=a._$view.height())},_getViewWidth:function(){var a=this;return a._maxSize},_getViewHeight:function(){var a=this;return a._maxSize},refresh:function(){var b=this,c=b.options,d=0,e=0,f=null;f=a("#"+c.template);if(!f)return;b._templateText=b._insertAriaAttrToTmpl(f.text()),d=b._calculateClipWidth(),e=b._calculateClipHeight(),b._$view.width(d).height(e),b._$clip.width(d).height(e),b._clipSize=b._calculateClipSize(),b._calculateColumnSize(),b._initPageProperty(),b._setScrollBarSize()},_initPageProperty:function(){var b=this,c=0,d,e=0,f=0,g=b._direction?"width":"height";e=b._calculateColumnCount(),f=parseInt(b._numItemData/e,10),b._totalRowCnt=b._numItemData%e===0?f:f+1,b._itemCount=e;if(b._cellSize<=0)return;c=b._clipSize/b._cellSize,c=Math.ceil(c),b._rowsPerView=parseInt(c,10),d=a(b._makeRows(c+2)),b._$view.append(d.children()),b._$view.children().css(g,b._cellSize+"px"),b._$rows=b._$view.children().detach(),b._reservedPos=-b._cellSize,b._scalableSize=-b._cellSize,b._initLayout(),b._blockScroll=b._rowsPerView>b._totalRowCnt,b._maxSizeExceptClip=(b._totalRowCnt-b._rowsPerView)*b._cellSize,b._maxSize=b._totalRowCnt*b._cellSize,b._maxViewSize=b._rowsPerView*b._cellSize,b._modifyViewPos=-b._cellSize,b._clipSize<b._maxViewSize&&(b._modifyViewPos=-b._cellSize+(b._clipSize-b._maxViewSize))},_getinheritedSize:function(b){var c=a(b),d,e,f={ELEMENT_NODE:1,TEXT_NODE:3},g={isDefinedWidth:!1,isDefinedHeight:!1,width:0,height:0};while(c[0].nodeType===f.ELEMENT_NODE&&(g.isDefinedWidth===!1||g.isHeightDefined===!1)){d=c[0].style.height,e=c[0].style.width,g.isDefinedHeight===!1&&d!==""&&(g.isDefinedHeight=!0,g.height=parseInt(d,10)),g.isDefinedWidth===!1&&e!==""&&(g.isDefinedWidth=!0,g.width=parseInt(e,10)),c=c.parent();if(c.hasClass("ui-content"))break}return g},_resize:function(){var a=this,b=null,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=null,l=0;a._direction?(l=a._calculateClipHeight(),a._$view.height(l),a._$clip.height(l)):(l=a._calculateClipWidth(),a._$view.width(l),a._$clip.width(l)),d=a._calculateColumnCount(),d!=a._itemCount&&(e=parseInt(a._numItemData/d,10),a._totalRowCnt=a._numItemData%d===0?e:e+1,h=a._itemCount,a._itemCount=d,i=a._getClipPosition(),a._$view.hide(),f=a._replaceRows(d,h,a._totalRowCnt,i),a._maxSizeExceptClip=(a._totalRowCnt-a._rowsPerView)*a._cellSize,a._maxSize=a._totalRowCnt*a._cellSize,a._scalableSize+=-f*a._cellSize,a._reservedPos+=-f*a._cellSize,a._setScrollBarSize(),a._setScrollBarPosition(f),a._$view.show()),g=a._calculateClipSize(),g!==a._clipSize&&(c=g/a._cellSize,c=parseInt(Math.ceil(c),10),c>a._rowsPerView?a._increaseRow(c-a._rowsPerView):c<a._rowsPerView&&a._decreaseRow(a._rowsPerView-c),a._$rows=a._$view.children(),a._$rows.sort(function(a,b){return a.getAttribute("row-index")-b.getAttribute("row-index")}),a._rowsPerView=c,a._clipSize=g,a._blockScroll=a._rowsPerView>a._totalRowCnt,a._maxSizeExceptClip=(a._totalRowCnt-a._rowsPerView)*a._cellSize,a._maxSize=a._totalRowCnt*a._cellSize,a._maxViewSize=a._rowsPerView*a._cellSize,a._clipSize<a._maxViewSize&&(a._modifyViewPos=-a._cellSize+(a._clipSize-a._maxViewSize)),a._direction?a._$clip.width(a._clipSize):a._$clip.height(a._clipSize),a._setScrollBarSize(),a._setScrollBarPosition(0),a._setViewSize())},resize:function(){var b=this,c=0,d=a(".ui-virtualgrid-view");b._inheritedSize=b._getinheritedSize(b.element),d.length!==0&&b._resize()},_initScrollView:function(){var b=this,c=b.options.direction;a.extend(b.options,b._scrollView.options),b.options.direction=c,b.options.moveThreshold=10,b.options.showScrollBars=!1,b._getScrollHierarchy=b._scrollView._getScrollHierarchy,b._makePositioned=b._scrollView._makePositioned,b._set_scrollbar_size=b._scrollView._set_scrollbar_size,b._setStyleTransform=b._scrollView._setElementTransform,b._hideOverflowIndicator=b._scrollView._hideOverflowIndicator,b._showOverflowIndicator=b._scrollView._showOverflowIndicator,b._setGestureScroll=b._scrollView._setGestureScroll},_createTracker:function(){var a=this;a._tracker=new f(a.options),a._direction?(a._hTracker=a._tracker,a._$clip.width(a._clipSize)):(a._vTracker=a._tracker,a._$clip.height(a._clipSize))},_createOverflowArea:function(){var b=this,c='<div class="ui-virtualgrid-overflow-indicator-',d='-top"></div>',e='-bottom"></div>';if(b.options.rotation)return;b._direction?(b._overflowTop=a(c+"x"+d),b._overflowBottom=a(c+"x"+e)):(b._overflowTop=a(c+"y"+d),b._overflowBottom=a(c+"y"+e)),b._$clip.append(b._overflowTop),b._$clip.append(b._overflowBottom),b._overflowDisplayed=!1},_hideVGOverflowIndicator:function(){if(this._overflowDisplayed===!1)return;this._overflowTop.animate({opacity:0},300),this._overflowBottom.animate({opacity:0},300),this._overflowDisplayed=!1},_createScrollBar:function(){var a=this,b='<div class="ui-scrollbar ui-scrollbar-',c='"><div class="ui-scrollbar-track"><div class="ui-scrollbar-thumb"></div></div></div>';if(a.options.rotation)return;a._direction?(a._$clip.append(b+"x"+c),a._hScrollBar=a._$clip.children(".ui-scrollbar-x"),a._hScrollBar.find(".ui-scrollbar-thumb").addClass("ui-scrollbar-thumb-x")):(a._$clip.append(b+"y"+c),a._vScrollBar=a._$clip.children(".ui-scrollbar-y"),a._vScrollBar.find(".ui-scrollbar-thumb").addClass("ui-scrollbar-thumb-y"))},_setScrollBarSize:function(){var a=this,b=0,c=0,d,e,f;if(a.options.rotation)return;b=parseInt(a._maxViewSize/a._clipSize,10),a._direction?(d=a._hScrollBar.find(".ui-scrollbar-thumb"),e="width",c=d.width(),f="ui-scrollbar-thumb-x",a._hScrollBar.css("width",a._clipSize)):(d=a._vScrollBar.find(".ui-scrollbar-thumb"),e="height",f="ui-scrollbar-thumb-y",c=d.height(),a._vScrollBar.css("height",a._clipSize)),b>c?(d.removeClass(f),d.css(e,b)):b=c,a._itemScrollSize=parseFloat((a._clipSize-b)/(a._totalRowCnt-a._rowsPerView)),a._itemScrollSize=Math.round(a._itemScrollSize*100)/100},_setScrollBarPosition:function(a,b){var c=this,d=null,e="0px",f="0px",g;if(c.options.rotation)return;c._currentItemCount=c._currentItemCount+a,c._vScrollBar?(d=c._vScrollBar.find(".ui-scrollbar-thumb"),f=c._currentItemCount*c._itemScrollSize+"px"):(d=c._hScrollBar.find(".ui-scrollbar-thumb"),e=c._currentItemCount*c._itemScrollSize+"px"),c._setStyleTransform(d,e,f,b)},_hideScrollBars:function(){var a=this,b="ui-scrollbar-visible";if(a.options.rotation)return;a._vScrollBar?a._vScrollBar.removeClass(b):a._hScrollBar.removeClass(b)},_showScrollBars:function(){var a=this,b="ui-scrollbar-visible";if(a.options.rotation)return;a._vScrollBar?a._vScrollBar.addClass(b):a._hScrollBar.addClass(b)},centerTo:function(b){var c=this,d=null,e=null,f=-1,g=c._$rows.length,h,i;if(!c.options.rotation)return;for(i=0;i<g;++i){d=a(c._$rows[i]),e=d.children("."+b);if(e.length){f=parseInt(d.attr("row-index"),10);break}}if(f===-1){f=c._getTargetRowIndex(b);if(f===-1)return}h=-(f*c._cellSize-(c._clipSize-c._cellSize)/2),c._direction?c.scrollTo(h,0):c.scrollTo(0,h)},_getTargetRowIndex:function(a){var b=this,c=b._numItemData,d=b._itemCount,e=b._direction?"top":"left",f="",g=b._totalRowCnt,h;for(h=0;h<c;++h){f=b._makeHtmlData(h,h%d,e);if(b._hasClassItem(f,a)){g=parseInt(h/d,10);break}}return g===b._totalRowCnt?-1:g},_hasClassItem:function(a,b){var c=this,d=c._getItemClass(a);return d.indexOf(b)===-1?!1:d.indexOf("virtualgrid-item")===-1?!1:!0},_getItemClass:function(a){var b=a.indexOf("class"),c=Math.min(a.indexOf('"',b),a.indexOf("'",b)),d=Math.min(a.indexOf('"',c+1),a.indexOf("'",c+1));return a.slice(c+1,d)},scrollTo:function(a,b,c){var d=this;d._direction?(a-=d._cellSize,d._sx=d._reservedPos,d._reservedPos=a):(b-=d._cellSize,d._sy=d._reservedPos,d._reservedPos=b),d._scrollView.scrollTo.apply(this,[a,b,c])},getScrollPosition:function(){return this.direction?{x:-this._ry,y:0}:{x:0,y:-this._ry}},_setScrollPosition:function(a,b){var c=this,d=c._scalableSize,f=c._direction?a:b,g=f-d,k=parseInt(g/c._cellSize,10),l=0,m=0,n=0,o=c._rowsPerView+2,p=c._$view[0];if(c._blockScroll){g>0&&f>=-c._cellSize&&c._scalableSize>=-c._cellSize&&(c._overflowDir=i),g<0&&c._scalableSize<=-(c._maxSizeExceptClip+c._cellSize)&&(c._overflowDir=j);return}if(!c.options.rotation){if(g>0&&f>=-c._cellSize&&c._scalableSize>=-c._cellSize){c._stopMScroll(),c._scalableSize=-c._cellSize,c._setElementTransform(-c._cellSize),c._overflowDir===h&&(c._overflowDir=i);return}if(g<0&&c._scalableSize<=-(c._maxSizeExceptClip+c._cellSize)){c._stopMScroll(),c._scalableSize=-(c._maxSizeExceptClip+c._cellSize),c._setElementTransform(c._modifyViewPos),c._overflowDir===h&&(c._overflowDir=j);return}}n=Math.abs(k)<o?0:k>0?k-o:k+o;if(k>0)for(l=n;l<k;++l)m=-parseInt(d/c._cellSize+l+3,10),c._replaceRow(p.lastChild,e(m,c._totalRowCnt)),p.insertBefore(p.lastChild,p.firstChild);else if(k<0)for(l=n;l>k;--l)m=c._rowsPerView-parseInt(d/c._cellSize+l,10),c._replaceRow(p.firstChild,e(m,c._totalRowCnt)),p.insertBefore(p.firstChild,p.lastChild.nextSibling);c._setScrollBarPosition(-k),c._scalableSize+=k*c._cellSize,c._setElementTransform(f-c._scalableSize-c._cellSize)},_setElementTransform:function(a){var b=this,c=0,d=0;b._direction?c=a+"px":d=a+"px",b._setStyleTransform(b._$view,c,d)},_handleMomentumScroll:function(){var a=this,b=a.options,c=!1,d=this._$view,e=0,f=0,g=a._tracker;g&&(g.update(),a._direction?e=g.getPosition():f=g.getPosition(),c=!g.done()),a._setScrollPosition(e,f),b.rotation?a._reservedPos=a._direction?e:f:(c=!g.done(),a._reservedPos=a._direction?e:f,a._reservedPos=a._reservedPos<=-(a._maxSizeExceptClip-a._modifyViewPos)?-(a._maxSizeExceptClip+a._cellSize):a._reservedPos,a._reservedPos=a._reservedPos>-a._cellSize?-a._cellSize:a._reservedPos),a._$clip.trigger(a.options.updateEventName,[{x:e,y:f}]),c?a._timerID=setTimeout(a._timerCB,a._timerInterval):a._stopMScroll()},_startMScroll:function(a,b){var c=this;c._direction?c._sx=c._reservedPos:c._sy=c._reservedPos,c._scrollView._startMScroll.apply(c,[a,b])},_stopMScroll:function(){this._scrollView._stopMScroll.apply(this)},_enableTracking:function(){var a=this;a._$view.bind(a._dragMoveEvt,a._dragMoveCB),a._$view.bind(a._dragStopEvt,a._dragStopCB),a._scrollView._enableTracking.apply(a)},_disableTracking:function(){var a=this;a._$view.unbind(a._dragMoveEvt,a._dragMoveCB),a._$view.unbind(a._dragStopEvt,a._dragStopCB),a._scrollView._disableTracking.apply(a)},_handleDragStart:function(a,b,c){var d=this;d._scrollView._handleDragStart.apply(this,[a,b,c]),d._eventPos=d._direction?b:c,d._nextPos=d._reservedPos},_handleDragMove:function(a,b,c){var d=this,e=b-d._lastX,f=c-d._lastY,g=0,j=0,k=0,m=0,n=0,o=0,p=null;return d._lastMove=l(),d._speedX=e,d._speedY=f,d._didDrag=!0,d._lastX=b,d._lastY=c,d._direction?(d._movePos=b-d._eventPos,g=d._nextPos+d._movePos,o=b):(d._movePos=c-d._eventPos,j=d._nextPos+d._movePos,o=c),d._showScrollBars(),d._setScrollPosition(g,j),d._overflowDir!==h&&(p=d._overflowDir===i?d._overflowTop:d._overflowBottom,d._overflowDisplayed||(d._overflowDisplayed=!0,d._overflowStartPos=o),k=(o-d._overflowStartPos)*d._overflowDir,n=k<0?0:k>d._overflowMaxDragDist?1:k/d._overflowMaxDragDist,p.css("opacity",n)),!1},_handleDragStop:function(a){var b=this;return b._reservedPos=b._movePos?b._nextPos+b._movePos:b._reservedPos,b._scrollView._handleDragStop.apply(this,[a]),b._overflowDir!==h&&(b._overflowDir=h,b._hideVGOverflowIndicator()),b._didDrag?!1:d},_addBehaviors:function(){var d=this;d.options.eventType==="mouse"?(d._dragStartEvt="mousedown",d._dragStartCB=function(a){return d._handleDragStart(a,a.clientX,a.clientY)},d._dragMoveEvt="mousemove",d._dragMoveCB=function(a){return d._handleDragMove(a,a.clientX,a.clientY)},d._dragStopEvt="mouseup",d._dragStopCB=function(a){return d._handleDragStop(a,a.clientX,a.clientY)},d._$view.bind("vclick",function(a){return!d._didDrag})):(d._dragStartEvt="touchstart",d._dragStartCB=function(a){var b=a.originalEvent.targetTouches[0];return d._handleDragStart(a,b.pageX,b.pageY)},d._dragMoveEvt="touchmove",d._dragMoveCB=function(a){var b=a.originalEvent.targetTouches[0];return d._handleDragMove(a,b.pageX,b.pageY)},d._dragStopEvt="touchend",d._dragStopCB=function(a){return d._handleDragStop(a)}),d._$view.bind(d._dragStartEvt,d._dragStartCB),d._$view.delegate(".virtualgrid-item","click",function(b){var c=a(this);c.trigger("select",this)}),a(b).bind("resize",function(b){var c=0,e=a(".ui-virtualgrid-view");e.length!==0&&d._resize()}),a(c).one("pageshow",function(c){var e=a(d.element).parents(".ui-page"),f=e.find(":jqmData(role='header')"),g=e.find(":jqmData(role='footer')"),h=e.find(":jqmData(role='content')"),i=g?g.height():0,j=f?f.height():0;e&&h&&(h.height(b.innerHeight-j-i).css("overflow","hidden"),h.addClass("ui-virtualgrid-content"))})},_calculateClipSize:function(){var a=this,b=0;return a._direction?b=a._calculateClipWidth():b=a._calculateClipHeight(),b},_calculateClipWidth:function(){var c=this,d=c._$clip.parent(),e=0,f=a(b).width();return c._inheritedSize.isDefinedWidth?c._inheritedSize.width:(d.hasClass("ui-content")?(e=parseInt(d.css("padding-left"),10),f-=e||0,e=parseInt(d.css("padding-right"),10),f-=e||0):f=c._$clip.width(),f)},_calculateClipHeight:function(){var c=this,d=c._$clip.parent(),e=null,f=null,g=0,h=a(b).height();return c._inheritedSize.isDefinedHeight?c._inheritedSize.height:(d.hasClass("ui-content")?(g=parseInt(d.css("padding-top"),10),h-=g||0,g=parseInt(d.css("padding-bottom"),10),h-=g||0,e=d.siblings(".ui-header"),f=d.siblings(".ui-footer"),e&&(e.outerHeight(!0)===null?h-=a(".ui-header").outerHeight()||0:h-=e.outerHeight(!0)),f&&(h-=f.outerHeight(!0))):h=c._$clip.height(),h)},_calculateColumnSize:function(){var b=this,c,d;c=a(b._makeRows(1)),b._$view.append(c.children().first()),b._direction?(b._viewSize=b._$view.width(),d=b._$view.children().first().children().first(),b._cellSize=d.outerWidth(!0),b._cellOtherSize=d.outerHeight(!0)):(b._viewSize=b._$view.height(),d=b._$view.children().first().children().first(),b._cellSize=d.outerHeight(!0),b._cellOtherSize=d.outerWidth(!0)),c.remove(),b._$view.children().remove()},_calculateColumnCount:function(){var a=this,b=a._$clip,c=a._direction?b.innerHeight():b.innerWidth(),d=0;return a._direction?c-=parseInt(b.css("padding-top"),10)+parseInt(b.css("padding-bottom"),10):c-=parseInt(b.css("padding-left"),10)+parseInt(b.css("padding-right"),10),d=parseInt(c/a._cellOtherSize,10),d>0?d:1},_getClipPosition:function(){var a=this,b=null,c=null,d=-a._cellSize,e=a._$view.closest(".ui-scrollview-view");return e&&(b=e.css("-webkit-transform"),c=b.substr(7),c=c.substr(0,c.length-1),c=c.split(", "),d=Math.abs(c[5])),d},_makeRows:function(a){var b=this,c=0,d=null,e=null;e=b._createElement("div"),e.setAttribute("class","ui-scrollview-view");for(c=0;c<a;c+=1)d=b._makeRow(c),b._direction&&(d.style.top=0,d.style.left=c*b._cellSize),e.appendChild(d);return e},_makeRow:function(a){var b=this,c=a*b._itemCount,d=0,e=b._direction?"ui-virtualgrid-wrapblock-x":"ui-virtualgrid-wrapblock-y",f=b._createElement("div"),g="",h=b._direction?"top":"left";for(d=0;d<b._itemCount;d++)g+=b._makeHtmlData(c,d,h),c+=1;return f.innerHTML=g,f.setAttribute("class",e),f.setAttribute("row-index",String(a)),b._fragment.appendChild(f),f},_makeHtmlData:function(a,b,c){var d=this,e="",f=null;return f=d._itemData(a),f&&(e=d._getConvertedTmplStr(f),e=d._insertPosToTmplStr(e,c,b*d._cellOtherSize)),e},_insertPosToTmplStr:function(a,b,c){var d=a.indexOf(">"),e=-1,f,g,h,i=!1,j=0,k,l=0;if(d===-1)return;f=a.slice(0,d),g=a.slice(d,a.length),e=f.indexOf("class");if(e!==-1){k=f.length;for(l=e+6;l<k;l++)if(f.charAt(l)==='"'||f.charAt(l)==="'"){if(i!==!1){j=l;break}i=!0}h=f.slice(0,j)+" virtualgrid-item"+f.slice(j,k)+g}else h=f+' class="virtualgrid-item"'+g;return isNaN(c)||(h=h.replace(">",' style="'+b+": "+String(c)+'px">')),h},_increaseRow:function(b){var c=this,d=c.options.rotation,f=c._totalRowCnt,g=c._$view[0],h=null,i=g.lastChild,j=null,k=0,l=0,m;if(!i)return;l=parseInt(i.getAttribute("row-index"),10),d||(h=g.firstChild,k=parseInt(h.getAttribute("row-index"),10));for(m=0;m<b;++m){if(l>=f-1&&!d){if(k==0)break;j=c._makeRow(--k),g.insertBefore(j,h),h=j}else j=c._makeRow(e(++l,f)),g.appendChild(j);c._direction?a(j).width(c._cellSize):a(j).height(c._cellSize)}},_decreaseRow:function(a){var b=this,c=b._$view[0],d;for(d=0;d<a;++d)c.removeChild(c.lastChild)},_replaceRows:function(b,c,d,f){var g=this,h=g._$view.children(),i=0,j=0,k=0,l=1,m=g._filterRatio*g._cellSize+g._cellSize,n=0;m<f&&(l+=1),i=parseInt(a(h[l]).attr("row-index"),10),i===0?j=d-l:(j=Math.round(i*c/b),j+g._rowsPerView>=d&&(j=d-g._rowsPerView),k=i-j,j-=l);for(n=0;n<h.length;n+=1)g._replaceRow(h[n],e(j,g._totalRowCnt)),j++;return-k},_replaceRow:function(a,b){var c=this,d=null;while(a.hasChildNodes())a.removeChild(a.lastChild);d=c._makeRow(b);while(d.children.length)a.appendChild(d.children[0]);a.setAttribute("row-index",d.getAttribute("row-index")),d.parentNode.removeChild(d)},_createElement:function(a){var b=c.createElement(a);return this._fragment.appendChild(b),b},_getObjectNames:function(a){var b=[],c="";for(c in a)b.push(c);this._properties=b},_getConvertedTmplStr:function(a){var b=this,c=b._properties,d=0,e,f="";if(!a)return;e=b._templateText;for(d=0;d<c.length;d++)e=b._strReplace(e,"${"+c[d]+"}",a[c[d]]);return e=b._changeImgSrcAriaAttrFromTmpl(e),e},_changeImgSrcAriaAttrFromTmpl:function(a){var b=this,c="",d,e="",f="",g,h,i,j;i=a,d=i.indexOf("$ARIA-IMG-SRC-ALT$");while(d!==-1)g="",e+=i.slice(0,d+19),f=i.slice(d+19,i.length),j=f.match(k),j&&(h=j[0].lastIndexOf("/"),h!==-1&&(g=j[0].slice(h+1,-1))),e=e.replace("$ARIA-IMG-SRC-ALT$",g),i=f,d=i.indexOf("$ARIA-IMG-SRC-ALT$"),c=e+f;return c===""&&(c=a),c},_insertAriaAttrToTmpl:function(a){var b="",c,d="",e="",f;f=a.replace("<div",'<div tabindex="0" aria-selected="true"'),c=f.indexOf("<img");if(c!==-1){while(c!==-1)d+=f.slice(0,c+4),e=f.slice(c+4,f.length),d+=' role="img" alt="$ARIA-IMG-SRC-ALT$"',f=e,c=f.indexOf("<img"),b=d+e;f=b,c=f.indexOf("<span"),d="";while(c!==-1)d+=f.slice(0,c+5),e=f.slice(c+5,f.length),d+=' aria-hidden="true" tabindex="-1"',f=e,c=f.indexOf("<span"),b=d+e}return b===""&&(b=a),b},_strReplace:function(a,b,c){var d=a,e=a.indexOf(b);while(e!==-1)d=d.replace(b,c),e=d.indexOf(b);return d}}),a(c).bind("pagecreate create",function(b){a(":jqmData(role='virtualgrid')").virtualgrid()})}(jQuery,window,document),function(a,b){function c(){var b=a("script[data-framework-version][data-framework-root][data-framework-theme]");return b.attr("data-framework-root")+"/"+b.attr("data-framework-version")+"/themes/"+b.attr("data-framework-theme")+"/proto-html"}a.widget("tizen.widgetex",a.mobile.widget,{_createWidget:function(){a.tizen.widgetex.loadPrototype.call(this,this.namespace+"."+this.widgetName),a.mobile.widget.prototype._createWidget.apply(this,arguments)},_init:function(){if(this.element===b)return;var c=this.element.closest(".ui-page"),d=this,e={};c.is(":visible")?this._realize():c.bind("pageshow",function(){d._realize()}),a.extend(e,this.options),this.options={},this._setOptions(e)},_getCreateOptions:function(){if(this.element.is("input")&&this._value!==b){var c=this.element.attr("type")==="checkbox"||this.element.attr("type")==="radio"?this.element.is(":checked"):this.element.is("[value]")?this.element.attr("value"):b;c!=b&&this.element.attr(this._value.attr,c)}return a.mobile.widget.prototype._getCreateOptions.apply(this,arguments)},_setOption:function(c,d){var e="_set"+c.replace(/^[a-z]/,function(a){return a.toUpperCase()});this[e]!==b?this[e](d):a.mobile.widget.prototype._setOption.apply(this,arguments)},_setDisabled:function(b){a.Widget.prototype._setOption.call(this,"disabled",b),this.element.is("input")&&this.element.attr("disabled",b)},_setValue:function(b){a.tizen.widgetex.setValue(this,b)},_realize:function(){}}),a.tizen.widgetex.setValue=function(a,c){if(a._value!==b){var d=a._value.makeString?a._value.makeString(c):c,e;a.element.attr(a._value.attr,d),a._value.signal!==b&&a.element.triggerHandler(a._value.signal,c),a.element.is("input")&&(e=a.element.attr("type"),e==="checkbox"||e==="radio"?c?a.element.attr("checked",!0):a.element.removeAttr("checked"):a.element.attr("value",d),a.element.trigger("change"))}},a.tizen.widgetex.assignElements=function(b,c){var d={},e;for(e in c)typeof c[e]=="string"?(d[e]=b.find(c[e]),c[e].match(/^#/)&&d[e].removeAttr("id")):typeof c[e]=="object"&&(d[e]=a.tizen.widgetex.assignElements(b,c[e]));return d},a.tizen.widgetex.loadPrototype=function(d,e){var f=d.split("."),g,h,i,j=!1,k,l;f.length==2&&(g=f[0],h=f[1],a[g][h].prototype._htmlProto!==b&&(i=a[g][h].prototype._htmlProto.source,i===b&&(i=h,j=!0),typeof i=="string"?j?(d=i,l=c(),a.ajax({url:l+"/"+d+".prototype.html",async:!1,dataType:"html"}).success(function(b,c,d){i=a("<div></div>").html(b).jqmData("tizen.widgetex.ajax.fail",!1)}),i=a("<div></div>").text("Failed to load proto for widget "+g+"."+h+"!").css({background:"red",color:"blue",border:"1px solid black"}).jqmData("tizen.widgetex.ajax.fail",!0)):i=a(i).jqmData("tizen.widgetex.ajax.fail",!1):i.jqmData("tizen.widgetex.ajax.fail",!1),k=i,a[g][h].prototype._htmlProto.source=i,a[g][h].prototype._htmlProto.ui!==b&&a.extend(this,{_ui:a.tizen.widgetex.assignElements(k.clone(),a[g][h].prototype._htmlProto.ui)})))}}(jQuery),function(a,b){var c={},d=0,e=1,f=-1;a.widget("tizen.virtuallistview",a.mobile.widget,{options:{theme:"s",countTheme:"s",headerTheme:"s",dividerTheme:"s",splitIcon:"arrow-r",splitTheme:"s",inset:!1,id:"",childSelector:" li",dbtable:"",template:"",dbkey:!1,scrollview:!1,row:100,page_buf:30,initSelector:":jqmData(role='virtuallistview')"},_stylerMouseUp:function(){a(this).addClass("ui-btn-up-s"),a(this).removeClass("ui-btn-down-s")},_stylerMouseDown:function(){a(this).addClass("ui-btn-down-s"),a(this).removeClass("ui-btn-up-s")},_stylerMouseOver:function(){a(this).toggleClass("ui-btn-hover-s")},_stylerMouseOut:function(){a(this).toggleClass("ui-btn-hover-s"),a(this).addClass("ui-btn-up-s"),a(this).removeClass("ui-btn-down-s")},_pushData:function(b){var c=this.options,d,e=a("#"+b),f=c.row>this._numItemData?this._numItemData:c.row,g;for(d=0;d<f;d++)g=e.tmpl(this._itemData(d)),a(c.id).append(a(g).attr("id",c.itemIDPrefix+d));a(c.id).trigger("create")},_reposition:function(b){var c,d=this,e,f;b.data?c=b.data:c=b,a(c.id+c.childSelector).size()>0&&(d._title_h=a(c.id+c.childSelector+":first").position().top,d._line_h=a(c.id+c.childSelector+":first").outerHeight(),d._container_w=a(c.id).innerWidth(),e=parseInt(a(c.id+c.childSelector).css("padding-left"),10)+parseInt(a(c.id+c.childSelector).css("padding-right"),10),a(c.id+">"+c.childSelector).addClass("position_absolute").addClass("ui-btn-up-s").bind("mouseup",d._stylerMouseUp).bind("mousedown",d._stylerMouseDown).bind("mouseover",d._stylerMouseOver).bind("mouseout",d._stylerMouseOut)),a(c.id+">"+c.childSelector).each(function(b){f=parseInt(a(this).css("margin-left"),10)+parseInt(a(this).css("margin-right"),10),a(this).css("top",d._title_h+d._line_h*b+"px").css("width",d._container_w-e-f)}),a(c.id).height(d._numItemData*d._line_h)},_resize:function(b){var c,d=this,e,f,g;b.data?c=b.data:c=b,e=a(c).children(c.childSelector),d._container_w=a(c).width(),f=parseInt(e.css("padding-left"),10)+parseInt(e.css("padding-right"),10),e.each(function(b,c){g=parseInt(a(this).css("margin-left"),10)+parseInt(a(this).css("margin-right"),10),a(this).css("width",d._container_w-f-g)})},_scrollmove:function(b){function j(){return d.scrollview?h.viewTop():i.viewTop()}function k(a){var b=!1;b&&console.log(">>virtualllist: "+a)}function l(b,c){function t(b,c,d){var e={ELEMENT_NODE:1,TEXT_NODE:3},f,g,h,i,j;a(c).find(".ui-li-text-main",".ui-li-text-sub",".ui-li-text-sub2","ui-btn-text").each(function(b){f=a(this),h=a(d).find(".ui-li-text-main",".ui-li-text-sub","ui-btn-text").eq(b).text(),a(f).contents().filter(function(){return this.nodeType==e.TEXT_NODE}).get(0).data=h}),a(c).find("img").each(function(b){var c=a(this);i=a(d).find("img").eq(b).attr("src"),a(c).attr("src",i)}),a(c).removeData()}function u(b,c,d){var e,f,g,h;return k(">> move item: "+c+" --> "+d),f=a("#"+b.options.itemIDPrefix+c),!f||!f.length?!1:(h=a("#"+b.options.template),h&&(g=h.tmpl(b._itemData(d)),t(b,f,g),g.remove()),f.css("top",d*b._line_h).attr("id",b.options.itemIDPrefix+d),!0)}var d,e,g,h=b._first_index,i=b._last_index,m,n,o,p,q=b.options.row,r,s;d=j(),r=Math.ceil(q/3),e=Math.floor(d/b._line_h)-r,g=e+q-1,e<0?(g+=-e,e=0):g>b._numItemData-1&&(e-=g-(b._numItemData-1),g=b._numItemData-1),m=e-h,k("cy="+d+", oti="+h+", obi="+i+", cti="+e+", cbi="+g+", dti="+m);if(0==m){b.timerStillCount+=1;if(b.timerStillCount<12){k("dti=0 "+b.timerStillCount+" times"),b.timerMoveID=setTimeout(l,f,b);return}k("dti=0 "+b.timerStillCount+" times. End timer."),b.timerStillCount=0,b.timerMoveID&&(clearTimeout(b.timerMoveID),b.timerMoveID=null)}else{b.timerStillCount=0,Math.abs(m)>=q?(n=h,o=i,p=m,k(">>> WHOLE CHANGE! delta="+p)):(m>0?(n=h,o=h+m-1,p=q):(n=i+m+1,o=i,p=-q),k(">>> partial change. delta="+p));for(s=n;s<=o;s++)u(b,s,s+p);b._first_index=e,b._last_index=g,b.timerMoveID=setTimeout(l,f,b)}return}var c=b.data,d=c.options,e=c._num_top_items,f=100,g,h,i;h={viewTop:function(){var b=a(d.id).parentsUntil(".ui-page").find(".ui-scrollview-view"),c=b.css("-webkit-transform"),e="0,0,0,0,0,0";return c&&(e=c.replace(/matrix\s*\((.*)\)/,"$1")),-parseInt(e.split(",")[5],10)}},i={viewTop:function(){return a(window).scrollTop()}},c.timerStillCount=0,c.timerMoveID&&(clearTimeout(c.timerMoveID),c.timerMoveID=null),l(c)},_recreate:function(b){var c=this,e=this.options;a(e.id).empty(),c._numItemData=b.length,c._direction=d,c._first_index=0,c._last_index=e.row-1,c._pushData(e.template)
271 ,e.childSelector==" ul"&&a(e.id+" ul").swipelist(),a(e.id).virtuallistview(),c.refresh(!0),c._reposition(e)},_initList:function(){var b=this,c=this.options;b._pushData(c.template),a(c.id).parentsUntil(".ui-page").parent().one("pageshow",function(){setTimeout(function(){b._reposition(c)},0)}),a(document).bind("scrollstart.virtuallist scrollstop.vrituallist",b,b._scrollmove),a(window).on("throttledresize",a(c.id),b._resize),c.childSelector==" ul"&&a(c.id+" ul").swipelist(),b.refresh(!0)},create:function(){var a=this.options;this._create.apply(this,arguments),this._reposition(a)},_create:function(b){a.extend(this,{_itemData:function(a){return null},_numItemData:0,_cacheItemData:function(a,b){},_title_h:0,_container_w:0,_minimum_row:100,_direction:d,_first_index:0,_last_index:0,_num_top_items:0});var c=this,e=this.options,f=this.element,g=a('<div class="ui-virtuallist"/>'),h=a("<ul></ul>"),i=f.find(':jqmData(role="virtuallistview" )'),j=null,k=this,l,m;f.addClass(function(a,b){return b+" ui-listview ui-virtual-list-container"+(c.options.inset?" ui-listview-inset ui-corner-all ui-shadow ":"")}),e.itemIDPrefix=f.attr("id")+"_",e.id="#"+f.attr("id"),a(e.id).bind("pagehide",function(b){a(e.id).empty()}),a(".ui-scrollview-clip").size()>0?e.scrollview=!0:e.scrollview=!1,f.data("row")&&(e.row=f.data("row"),e.row<c._minimum_row&&(e.row=c._minimum_row),e.page_buf=parseInt(e.row/2,10));if(b){if(!b.itemData||typeof b.itemData!="function")return;c._itemData=b.itemData;if(!b.numItemData)return;if(typeof b.numItemData=="function")c._numItemData=b.numItemData();else{if(typeof b.numItemData!="number")return;c._numItemData=b.numItemData}}else{console.warn("WARNING: The data interface of virtuallist is changed. \nOld data interface(data-dbtable) is still supported, but will be removed in next version. \nPlease fix your code soon!");if(!a(e.id).hasClass("vlLoadSuccess"))return;l=f.jqmData("dbtable"),m=window[l],a(e.id).empty(),m||(m={}),c._itemData=function(a){return m[a]},c._numItemData=m.length}f.data("template")&&(e.template=f.data("template"),f.data("swipelist")==1?e.childSelector=" ul":e.childSelector=" li"),f.data("dbkey")&&(e.dbkey=f.data("dbkey")),c._first_index=0,c._last_index=e.row-1,c._initList()},destroy:function(){var b=this.options;a(document).unbind("scrollstop"),a(window).off("throttledresize",this._resize),a(b.id).empty(),this.timerMoveID&&(clearTimeout(this.timerMoveID),this.timerMoveID=null)},_itemApply:function(b,c){var d=c.find(".ui-li-count");d.length&&c.addClass("ui-li-has-count"),d.addClass("ui-btn-up-"+(b.jqmData("counttheme")||this.options.countTheme)+" ui-btn-corner-all"),c.find("h1, h2, h3, h4, h5, h6").addClass("ui-li-heading").end().find("p, dl").addClass("ui-li-desc").end().find(">img:eq(0), .ui-link-inherit>img:eq(0)").addClass("ui-li-thumb").each(function(){c.addClass(a(this).is(".ui-li-icon")?"ui-li-has-icon":"ui-li-has-thumb")}).end().find(".ui-li-aside").each(function(){var b=a(this);b.prependTo(b.parent())})},_removeCorners:function(a,b){var c="ui-corner-top ui-corner-tr ui-corner-tl",d="ui-corner-bottom ui-corner-br ui-corner-bl";a=a.add(a.find(".ui-btn-inner, .ui-li-link-alt, .ui-li-thumb")),b==="top"?a.removeClass(c):b==="bottom"?a.removeClass(d):a.removeClass(c+" "+d)},_refreshCorners:function(a){var b,c,d,e;this.options.inset&&(b=this.element.children("li"),c=a?b.not(".ui-screen-hidden"):b.filter(":visible"),this._removeCorners(b),d=c.first().addClass("ui-corner-top"),d.add(d.find(".ui-btn-inner")).find(".ui-li-link-alt").addClass("ui-corner-tr").end().find(".ui-li-thumb").not(".ui-li-icon").addClass("ui-corner-tl"),e=c.last().addClass("ui-corner-bottom"),e.add(e.find(".ui-btn-inner")).find(".ui-li-link-alt").addClass("ui-corner-br").end().find(".ui-li-thumb").not(".ui-li-icon").addClass("ui-corner-bl"))},refresh:function(b){this.parentPage=this.element.closest(".ui-page"),this._createSubPages();var c=this.options,d=this.element,e=this,f=d.jqmData("dividertheme")||c.dividerTheme,g=d.jqmData("splittheme"),h=d.jqmData("spliticon"),i=d.children("li"),j=a.support.cssPseudoElement||!a.nodeName(d[0],"ol")?0:1,k,l,m,n,o,p,q,r,s,t,u;j&&d.find(".ui-li-dec").remove();for(s=0,t=i.length;s<t;s++){k=i.eq(s),l="ui-li";if(b||!k.hasClass("ui-li"))u=k.jqmData("theme")||c.theme,n=k.children("a"),n.length?(r=k.jqmData("icon"),k.buttonMarkup({wrapperEls:"div",shadow:!1,corners:!1,iconpos:"right",icon:!1,theme:u}),r!=0&&n.length==1&&k.addClass("ui-li-has-arrow"),n.first().addClass("ui-link-inherit"),n.length>1&&(l+=" ui-li-has-alt",o=n.last(),p=g||o.jqmData("theme")||c.splitTheme,o.appendTo(k).attr("title",o.getEncodedText()).addClass("ui-li-link-alt").empty().buttonMarkup({shadow:!1,corners:!1,theme:u,icon:!1,iconpos:!1}).find(".ui-btn-inner").append(a("<span />").buttonMarkup({shadow:!0,corners:!0,theme:p,iconpos:"notext",icon:h||o.jqmData("icon")||c.splitIcon})))):k.jqmData("role")==="list-divider"?(l+=" ui-li-divider ui-btn ui-bar-"+f,k.attr("role","heading"),j&&(j=1)):l+=" ui-li-static ui-body-"+u;j&&l.indexOf("ui-li-divider")<0&&(q=k.is(".ui-li-static:first")?k:k.find(".ui-link-inherit"),q.addClass("ui-li-jsnumbering").prepend("<span class='ui-li-dec'>"+j++ +". </span>")),k.add(k.children(".ui-btn-inner")).addClass(l),e._itemApply(d,k)}this._refreshCorners(b)},_idStringEscape:function(a){return a.replace(/\W/g,"-")},_createSubPages:function(){var b=this.element,d=b.closest(".ui-page"),e=d.jqmData("url"),f=e||d[0][a.expando],g=b.attr("id"),h=this.options,i="data-"+a.mobile.ns,j=this,k=d.find(":jqmData(role='footer')").jqmData("id"),l,m;typeof c[f]=="undefined"&&(c[f]=-1),g=g||++c[f],a(b.find("li>ul, li>ol").toArray().reverse()).each(function(c){var d=this,f=a(this),j=f.attr("id")||g+"-"+c,m=f.parent(),n,p=n.first().getEncodedText(),q=(e||"")+"&"+a.mobile.subPageUrlKey+"="+j,r=f.jqmData("theme")||h.theme,s=f.jqmData("counttheme")||b.jqmData("counttheme")||h.countTheme,t,u;n=a(f.prevAll().toArray().reverse()),n=n.length?n:a("<span>"+a.trim(m.contents()[0].nodeValue)+"</span>"),l=!0,t=f.detach().wrap("<div "+i+"role='page' "+i+"url='"+q+"' "+i+"theme='"+r+"' "+i+"count-theme='"+s+"'><div "+i+"role='content'></div></div>").parent().before("<div "+i+"role='header' "+i+"theme='"+h.headerTheme+"'><div class='ui-title'>"+p+"</div></div>").after(k?a("<div "+i+"role='footer' "+i+"id='"+k+"'>"):"").parent().appendTo(a.mobile.pageContainer),t.page(),u=m.find("a:first"),u.length||(u=a("<a/>").html(n||p).prependTo(m.empty())),u.attr("href","#"+q)}).virtuallistview(),l&&d.is(":jqmData(external-page='true')")&&d.data("page").options.domCache===!1&&(m=function(b,c){var f=c.nextPage,g;c.nextPage&&(g=f.jqmData("url"),g.indexOf(e+"&"+a.mobile.subPageUrlKey)!==0&&(j.childPages().remove(),d.remove()))},d.unbind("pagehide.remove").bind("pagehide.remove",m))},childPages:function(){var b=this.parentPage.jqmData("url");return a(":jqmData(url^='"+b+"&"+a.mobile.subPageUrlKey+"')")}}),a(document).bind("pagecreate create",function(b){a(a.tizen.virtuallistview.prototype.options.initSelector,b.target).virtuallistview()})}(jQuery),function(a,b,c,d){a.widget("tizen.tokentextarea",a.mobile.widget,{_focusStatus:null,_items:null,_viewWidth:0,_reservedWidth:0,_currentWidth:0,_fontSize:0,_anchorWidth:0,_labelWidth:0,_marginWidth:0,options:{label:"To : ",link:null,description:"+ {0}"},_create:function(){var b=this,d=this.element,e=d.jqmData("role"),f=this.options,g="ui-tokentextarea-link",h=a(c.createElement("input")),i=a(c.createElement("span")),j=a(c.createElement("a"));d.hide().empty().addClass("ui-"+e),a(i).text(f.label).addClass("ui-tokentextarea-label").attr("tabindex",0),d.append(i),a(h).addClass("ui-tokentextarea-input ui-tokentextarea-input-visible ui-input-text ui-body-s").attr("role","textbox"),d.append(h);if(f.link===null||a.trim(f.link).length<1||a(f.link).length===0)g+="-dim";a(j).attr("data-role","button").buttonMarkup({inline:!0,icon:"plus",style:"circle"}).attr({href:a.trim(f.link),tabindex:0}).addClass("ui-tokentextarea-link-base").addClass(g).find("span.ui-btn-text").text("Add recipient"),d.append(j),this._bindEvents(),b._focusStatus="init",d.show(),b._viewWidth=d.innerWidth(),b._reservedWidth+=b._calcBlockWidth(j),b._reservedWidth+=b._calcBlockWidth(i),b._fontSize=parseInt(a(j).css("font-size"),10),b._currentWidth=b._reservedWidth,b._modifyInputBoxWidth()},_bindEvents:function(){var b=this,d=b.element,e=b.options,f=d.find(".ui-tokentextarea-input"),g=d.find(".ui-tokentextarea-link-base");d.delegate("div","click",function(c){a(this).hasClass("ui-tokentextarea-sblock")&&b._removeTextBlock();var e=d.find("div.ui-tokentextarea-sblock");typeof e!="undefined"&&e.removeClass("ui-tokentextarea-sblock").addClass("ui-tokentextarea-block"),a(this).removeClass("ui-tokentextarea-block").addClass("ui-tokentextarea-sblock"),d.trigger("select")}),f.bind("keyup",function(c){var d=c.keyCode,e=a(f).val(),g=[],h,i=!1;if(d===8)e.length===0&&b._validateTargetBlock();else if(d===13||d===186||d===188){if(e.length!==0){g=e.split(/[,;]/);for(h=0;h<g.length;h++)g[h].length!==0&&g[h].replace(/\s/g,"").length!==0&&b._addTextBlock(g[h])}f.val(""),i=!0}else b._unlockTextBlock();return!i}),g.click(function(){if(a(g).hasClass("ui-tokentextarea-link-dim"))return;a(f).removeClass("ui-tokentextarea-input-visible").addClass("ui-tokentextarea-input-invisible"),a.mobile.changePage(e.link,{transition:"slide",reverse:!1,changeHash:!1})}),a(c).bind("pagechange.mbe",function(c){if(d.innerWidth()===0)return;b.refresh(),a(f).removeClass("ui-tokentextarea-input-invisible").addClass("ui-tokentextarea-input-visible")}),d.bind("click",function(a){b._focusStatus==="focusOut"&&b.focusIn()})},_addTextBlock:function(b,d){if(arguments.length===0)return;if(!b)return;var e=this,f=e.element,g=b,h=d,i=null,j=null;e._viewWidth===0&&(e._viewWidth=f.innerWidth()),j=a(c.createElement("div")),j.text(g).addClass("ui-tokentextarea-block").attr({"aria-label":"double tap to edit",tabindex:0}),j.css({visibility:"hidden"}),i=f.find("div"),h!==null&&h<=i.length?a(i[h]).before(j):f.find(".ui-tokentextarea-input").before(j),j=e._ellipsisTextBlock(j),j.css({visibility:"visible"}),e._modifyInputBoxWidth(),j.hide(),j.fadeIn("fast",function(){e._currentWidth+=e._calcBlockWidth(j),f.trigger("add")})},_removeTextBlock:function(){var a=this,b=this.element,c=b.find("div.ui-tokentextarea-sblock"),d=null,e=function(){};c!==null&&c.length>0?(a._currentWidth-=a._calcBlockWidth(c),c.fadeOut("fast",function(){c.remove(),a._modifyInputBoxWidth()}),this._eventRemoveCall=!0,b[0].remove&&(d=b[0].remove,b[0].remove=e),b.triggerHandler("remove"),d&&(b[0].remove=d),this._eventRemoveCall=!1):b.find("div:last").removeClass("ui-tokentextarea-block").addClass("ui-tokentextarea-sblock")},_calcBlockWidth:function(b){return a(b).outerWidth(!0)},_unlockTextBlock:function(){var a=this.element,b=a.find("div.ui-tokentextarea-sblock");b&&b.removeClass("ui-tokentextarea-sblock").addClass("ui-tokentextarea-block")},_validateTargetBlock:function(){var a=this,b=a.element,c=b.find("div:last"),d=null;c.hasClass("ui-tokentextarea-sblock")?a._removeTextBlock():(d=b.find("div.ui-tokentextarea-sblock"),d.removeClass("ui-tokentextarea-sblock").addClass("ui-tokentextarea-block"),c.removeClass("ui-tokentextarea-block").addClass("ui-tokentextarea-sblock"))},_ellipsisTextBlock:function(b){var c=this,d=c.element,e=c._viewWidth/2;return c._calcBlockWidth(b)>e&&a(b).width(e-c._marginWidth),b},_modifyInputBoxWidth:function(){var b=this,c=b.element,d=0,e=0,f=0,g=0,h=c.find("div"),i=0,j=0,k=10,l=c.find(".ui-tokentextarea-input");if(c.width()===0)return;b._labelWidth===0&&(b._labelWidth=c.find(".ui-tokentextarea-label").outerWidth(!0),b._anchorWidth=c.find(".ui-tokentextarea-link-base").outerWidth(!0),b._marginWidth=parseInt(a(l).css("margin-left"),10),b._marginWidth+=parseInt(a(l).css("margin-right"),10),b._viewWidth=c.innerWidth()),d=b._marginWidth,e=b._labelWidth,f=b._anchorWidth,g=b._viewWidth-e;for(j=0;j<h.length;j+=1)i=b._calcBlockWidth(h[j]),i>=g+f?i>=g?g=b._viewWidth-i:g=b._viewWidth:i>g?g=b._viewWidth-i:g-=i;g-=d,g<f*2&&(g=b._viewWidth-d),a(l).width(g-f-k)},_stringFormat:function(a){var b=null,c=a,d=0;for(d=1;d<arguments.length;d+=1)b="{"+(d-1)+"}",c=c.replace(b,arguments[d]);return c},_resizeBlocks:function(){var b=this,c=b.element,d=c.find("div"),e=0;for(e=0;e<d.length;e+=1)a(d[e]).css("width","auto"),d[e]=b._ellipsisTextBlock(d[e])},focusIn:function(){if(this._focusStatus==="focusIn")return;var a=this.element;a.find(".ui-tokentextarea-label").attr("tabindex",0).show(),a.find(".ui-tokentextarea-desclabel").remove(),a.find("div.ui-tokentextarea-sblock").removeClass("ui-tokentextarea-sblock").addClass("ui-tokentextarea-block"),a.find("div").attr({"aria-label":"double tap to edit",tabindex:0}).show(),a.find(".ui-tokentextarea-input").removeClass("ui-tokentextarea-input-invisible").addClass("ui-tokentextarea-input-visible").attr("tabindex",0),a.find("a").attr("tabindex",0).show(),this._modifyInputBoxWidth(),this._focusStatus="focusIn",a.removeClass("ui-tokentextarea-focusout").addClass("ui-tokentextarea-focusin").removeAttr("tabindex"),a.find(".ui-tokentextarea-input").focus()},focusOut:function(){if(this._focusStatus==="focusOut")return;var b=this,d=b.element,e=null,f=null,g=null,h="",i=0,j=10,k=d.find(".ui-tokentextarea-label"),l=d.find("span"),m=d.find("div"),n=d.outerWidth(!0)-l.outerWidth(!0)-k.outerWidth(!0),o=0;k.removeAttr("tabindex"),d.find(".ui-tokentextarea-input").removeClass("ui-tokentextarea-input-visible").addClass("ui-tokentextarea-input-invisible").removeAttr("tabindex"),d.find("a").removeAttr("tabindex").hide(),m.removeAttr("aria-label").removeAttr("tabindex").hide(),n-=b._reservedWidth;for(i=0;i<m.length;i++){o=a(m[i]).outerWidth(!0);if(n-o<=0){j=i-1;break}a(m[i]).show(),n-=o}j!==m.length&&(h=b._stringFormat(b.options.description,m.length-j-1),e=a(c.createElement("span")),e.addClass("ui-tokentextarea-desclabel").attr({"aria-label":"more, double tap to edit",tabindex:"-1"}),f=a(c.createElement("span")).text(h).attr("aria-hidden","true"),g=a(c.createElement("span")).text(m.length-j-1).attr("aria-label","and").css("visibility","hidden"),e.append(f),e.append(g),a(m[j]).after(e)),this._focusStatus="focusOut",d.removeClass("ui-tokentextarea-focusin").addClass("ui-tokentextarea-focusout").attr("tabindex",0)},inputText:function(a){var b=this.element;return arguments.length===0?b.find(".ui-tokentextarea-input").val():(b.find(".ui-tokentextarea-input").val(a),a)},select:function(b){var c=this.element,d=null,e=null;if(this._focusStatus==="focusOut")return;return arguments.length===0?(d=c.find("div.ui-tokentextarea-sblock"),d?d.text():null):(this._unlockTextBlock(),e=c.find("div"),e.length>b&&(a(e[b]).removeClass("ui-tokentextarea-block").addClass("ui-tokentextarea-sblock"),c.trigger("select")),null)},add:function(a,b){if(this._focusStatus==="focusOut")return;this._addTextBlock(a,b)},remove:function(b){var c=this,d=this.element,e=d.find("div"),f=0,g=null,h=function(){};if(this._focusStatus==="focusOut")return;arguments.length===0?e.fadeOut("fast",function(){e.remove(),c._modifyInputBoxWidth(),c._trigger("clear")}):isNaN(b)||(f=b<e.length?b:e.length-1,a(e[f]).fadeOut("fast",function(){a(e[f]).remove(),c._modifyInputBoxWidth()}),this._eventRemoveCall=!0,d[0].remove&&(g=d[0].remove,d[0].remove=h),d.triggerHandler("remove"),g&&(d[0].remove=g),this._eventRemoveCall=!1)},length:function(){return this.element.find("div").length},refresh:function(){var a=this,b=this.element.innerWidth();b&&a._viewWidth!==b&&(a._viewWidth=b),a._resizeBlocks(),a._modifyInputBoxWidth()},destroy:function(){var a=this.element,b=null,c=function(){};if(this._eventRemoveCall)return;a.find(".ui-tokentextarea-label").remove(),a.find("div").undelegate("click").remove(),a.find("a").remove(),a.find(".ui-tokentextarea-input").unbind("keyup").remove(),this._eventRemoveCall=!0,a[0].remove&&(b=a[0].remove,a[0].remove=c),a.remove(),b&&(a[0].remove=b),this._eventRemoveCall=!1,this._trigger("destroy")}}),a(c).bind("pagecreate create",function(){a(":jqmData(role='tokentextarea')").tokentextarea()}),a(b).bind("resize",function(){a(":jqmData(role='tokentextarea')").tokentextarea("refresh")})}(jQuery,window,document),function(a,b,c){a.tizen.scrollview.prototype.options.handler=!1,a.tizen.scrollview.prototype.options.handlerTheme="s";var d=a.tizen.scrollview.prototype._setOption,e=function(d){var e=d,f='<div class="ui-handler ui-handler-direction-',g='"><div class="ui-handler-track"><div class="ui-handler-handle"><div class="ui-handler-thumb"></div></div></div></div>',h=e.data("scrollview"),i=h.options,j=i.direction,k=a.mobile.getInheritedTheme(h,"s"),l=i.theme||k,m=h.options.direction==="x",n=h._$view,o=h._$clip,p=e.find(".ui-scrollbar"),q=null,r=null,s=0,t=0,u=0,v=0,w=0,x,y=a.support.touch,z=(y?"touchstart":"mousedown")+".handler",A=(y?"touchmove":"mousemove")+".handler",B=(y?"touchend":"mouseup")+".handler",C=(y?" touchleave":" mouseleave")+".handler",D=function(){t=m?o.width():o.height(),s=(m?n.width():n.height())-t,w=t-u-v*2},E=function(a){var b=Math.round((m?a.x:a.y)/s*w);r[0].style[m?"left":"top"]=b+"px"},F=function(){a(b).unbind(".handler"),e.moveData=null,n.trigger("scrollstop")};if(e.find(".ui-handler-handle").length!==0||typeof j!="string")return;q=a([f,j,g].join("")).appendTo(e.addClass(" ui-handler-"+l)),r=e.find(".ui-handler-handle").attr({tabindex:"0","aria-label":m?"Horizontal handler, double tap and move to scroll":"Verticalhandler, double tap and move to scroll"}).hide(),u=m?r.width():r.height(),v=m?parseInt(q.css("right"),10):parseInt(q.css("bottom"),10),a.extend(e,{moveData:null}),r.bind(z,{e:r[0]},function(c){h._stopMScroll();var d=c.data.e,f=y?c.originalEvent.targetTouches[0]:c;d.style.opacity=1,e.moveData={target:d,X:parseInt(d.style.left,10)||0,Y:parseInt(d.style.top,10)||0,pX:f.pageX,pY:f.pageY},D(),n.trigger("scrollstart"),y||c.preventDefault(),a(b).bind(A,function(a){var b=e.moveData,c=b.target,d=0,f=0,g=y?a.originalEvent.targetTouches[0]:a;d=m?b.X+g.pageX-b.pX:b.Y+g.pageY-b.pY,d<0&&(d=0),d>w&&(d=w),f=-Math.round(d/w*s),m?(h._setScrollPosition(f,0),c.style.left=d+"px"):(h._setScrollPosition(0,f),c.style.top=d+"px"),a.preventDefault()}).bind(B+C,function(a){F()})}),n.bind(B,function(a){F()}),e.bind("scrollstart",function(a){if(!h.enableHandler())return;D();if(s<0||t<u){p.is(":hidden")&&p.show();return}p.is(":visible")&&p.hide(),x&&(clearInterval(x),x=c),q.addClass("ui-handler-visible"),r.stop(!0,!0).fadeIn()}).bind("scrollupdate",function(a,b){if(!h.enableHandler()||s<0||t<u)return;E(h.getScrollPosition())}).bind("scrollstop",function(a){if(!h.enableHandler()||s<0||t<u)return;x=setInterval(function(){E(h.getScrollPosition()),h._gesture_timer||(clearInterval(x),x=c)},10),h._handlerTimer&&(clearTimeout(h._handlerTimer),h._handlerTimer=0),h._handlerTimer=setTimeout(function(){h._timerID===0&&e.moveData===null&&(r.stop(!0,!0).css("opacity",1).fadeOut(function(){q.removeClass("ui-handler-visible")}),h._handlerTimer=0)},1e3)}).bind("mousewheel",function(a){q.removeClass("ui-handler-visible"),E(h.getScrollPosition())})};a.extend(a.tizen.scrollview.prototype,{enableHandler:function(a){if(typeof a=="undefined")return this.options.handler;this.options.handler=!!a;var b=this.element;this.options.handler?(b.find(".ui-handler").length===0&&e(b),b.find(".ui-scrollbar").hide(),b.find(".ui-handler").show()):(b.find(".ui-handler").removeClass("ui-handler-visible").hide(),b.find(".ui-scrollbar").show())},_setHandlerTheme:function(a){if(!a)return;var b="ui-handler-"+this.options.handlerTheme,c="ui-handler-"+a;this.element.removeClass(b).addClass(c),this.options.handlerTheme=a},_setOption:function(a,b){switch(a){case"handler":this.enableHandler(b);break;case"handlerTheme":this._setHandlerTheme(b);break;default:d.call(this,a,b)}},_handlerTimer:0}),a(b).delegate(":jqmData(scroll)","scrollviewcreate",function(){var b=a(this);if(b.attr("data-"+a.mobile.ns+"scroll")==="none"||b.attr("data-"+a.mobile.ns+"handler")!=="true")return;b.scrollview("enableHandler","true")})}(jQuery,document),function(a,b,c){a.widget("tizen.progress",a.mobile.widget,{options:{style:"circle",running:!1},show:function(){a(this.element).show()},hide:function(){a(this.element).hide()},_start:function(){this.init||(a(this.element).append(this.html),this.init=!0),this.show(),a(this.element).find(".ui-progress-"+this.options.style).addClass(this.runningClass)},_stop:function(){a(this.element).find(".ui-progress-"+this.options.style).removeClass(this.runningClass)},running:function(a){if(a===c)return this.options.running;this._setOption("running",a)},_setOption:function(a,c){if(a==="running"){if(typeof c!="boolean"){b.alert("running value MUST be boolean type!");return}this.options.running=c,this._refresh()}},_refresh:function(){this.options.running?this._start():this._stop()},_create:function(){var b=this,c=this.element,d=c.jqmData("style"),e,f;d?this.options.style=d:d=this.options.style,d=="circle"?(a(this.element).addClass("ui-progress-container-circle"),e='<div class="ui-progress-circle"></div>'):d==="pending"&&(a(this.element).addClass("ui-progressbar"),e='<div class="ui-progressbar-bg"><div class="ui-progress-pending"></div></div>'),this.html=a(e),f="ui-progress-"+d+"-running",a.extend(this,{init:!1,runningClass:f}),d==="pending"&&(a(this.element).append(this.html),this.init=!0),this._refresh()}}),a(document).bind("pagecreate create",function(b){a(b.target).find(":jqmData(role='progress')").progress()})}(jQuery,this),function(a,b){a.widget("tizen.triangle",a.tizen.widgetex,{options:{extraClass:"",offset:null,color:null,location:"top",initSelector:":jqmData(role='triangle')"},_create:function(){var b=a("<div></div>",{"class":"ui-triangle"});a.extend(this,{_triangle:b}),this.element.addClass("ui-triangle-container").append(b)},_doCSS:function(){var b=this.options.location||"top",c=a.inArray(b,["top","bottom"])===-1?"top":"left",d={"border-bottom-color":"top"===b?this.options.color:"transparent","border-top-color":"bottom"===b?this.options.color:"transparent","border-left-color":"right"===b?this.options.color:"transparent","border-right-color":"left"===b?this.options.color:"transparent"};d[c]=this.options.offset,this._triangle.removeAttr("style").css(d)},_setOffset:function(b){this.options.offset=b,this.element.attr("data-"+(a.mobile.ns||"")+"offset",b),this._doCSS()},_setExtraClass:function(b){this._triangle.addClass(b),this.options.extraClass=b,this.element.attr("data-"+(a.mobile.ns||"")+"extra-class",b)},_setColor:function(b){this.options.color=b,this.element.attr("data-"+(a.mobile.ns||"")+"color",b),this._doCSS()},_setLocation:function(b){this.element.removeClass("ui-triangle-container-"+this.options.location).addClass("ui-triangle-container-"+b),this._triangle.removeClass("ui-triangle-"+this.options.location).addClass("ui-triangle-"+b),this.options.location=b,this.element.attr("data-"+(a.mobile.ns||"")+"location",b),this._doCSS()}}),a(document).bind("pagecreate create",function(b){a(a.tizen.triangle.prototype.options.initSelector,b.target).not(":jqmData(role='none'), :jqmData(role='nojs')").triangle()})}(jQuery),function(a,b,c,d){function f(a,b){a.tizen||(a.tizen={}),a.tizen.frameworkData=b.frameworkData,a.tizen.loadCustomGlobalizeCulture=b.loadCustomGlobalizeCulture,a.tizen.loadTheme=b.loadTheme,a.tizen.__tizen__=b}var e={libFileName:"tizen-web-ui-fw(.min)?.js",frameworkData:{rootDir:"/usr/lib/tizen-web-ui-fw",version:"0.1",theme:"tizen-white",viewportWidth:"device-width",viewportScale:!1,defaultFontSize:22,minified:!1,debug:!1},log:{debug:function(a){e.frameworkData.debug&&console.log(a)},warn:function(a){console.warn(a)},error:function(a){console.error(a)},alert:function(a){c.alert(a)}},util:{loadScriptSync:function(b,c,d){a.ajax({url:b,dataType:"script",async:!1,crossDomain:!1,success:c,error:function(c,f,g){if(d)d(c,f,g);else{var h=[404],i="Error while loading "+b+"\n"+c.status+":"+c.statusText;-1==a.inArray(c.status,h)?e.log.alert(i):e.log.warn(i)}}})},isMobileBrowser:function(){var a=c.navigator.appVersion.indexOf("Mobile"),b=-1<a;return b}},css:{cacheBust:document.location.href.match(/debug=true/)?"?cacheBust="+(new Date).getTime():"",addElementToHead:function(b){var c=document.getElementsByTagName("head")[0];c&&a(c).prepend(b)},makeLink:function(a){var b=document.createElement("link");return b.setAttribute("rel","stylesheet"),b.setAttribute("href",a),b.setAttribute("name","tizen-theme"),b},load:function(a){var b=document.getElementsByTagName("head")[0],c=b.getElementsByTagName("link"),d,f=null;for(d=0;d<c.length;d++){if(c[d].getAttribute("rel")!="stylesheet")continue;if(c[d].getAttribute("name")=="tizen-theme"||c[d].getAttribute("href")==a){f=c[d];break}}f?f.getAttribute("href")==a?e.log.debug("Theme is already loaded. Skip theme loading in the framework."):f.setAttribute("href",a):this.addElementToHead(this.makeLink(a))}},getParams:function(){function j(){var a=navigator.theme?navigator.theme.split(":")[0]:null;return a&&(a=a.replace("-hd",""),a.match(/^tizen-/)||(a="tizen-"+a)),a}var a=document.getElementsByTagName("script"),b=null,c=!1,e,f,g,h,i;for(e in a){f=a[e],g=f.src?f.getAttribute("src"):d;if(g&&g.match(this.libFileName)){h=g.split(/[\/\\]/),i=-3,this.frameworkData.rootDir=(f.getAttribute("data-framework-root")||h.slice(0,h.length+i).join("/")||this.frameworkData.rootDir).replace(/^file:(\/\/)?/,""),this.frameworkData.version=f.getAttribute("data-framework-version")||h[h.length+i]||this.frameworkData.version,this.frameworkData.theme=f.getAttribute("data-framework-theme")||j()||this.frameworkData.theme,this.frameworkData.viewportWidth=f.getAttribute("data-framework-viewport-width")||this.frameworkData.viewportWidth,this.frameworkData.viewportScale="true"===f.getAttribute("data-framework-viewport-scale")?!0:this.frameworkData.viewportScale,this.frameworkData.minified=g.search(/\.min\.js$/)>-1?!0:!1,this.frameworkData.debug="true"===f.getAttribute("data-framework-debug")?!0:this.frameworkData.debug,c=!0;break}}return c},loadTheme:function(a){var b,c,d;a||(a=e.frameworkData.theme),b=e.frameworkData.rootDir+"/"+e.frameworkData.version+"/themes/"+a,d=b+"/theme.js",e.frameworkData.minified?c=b+"/tizen-web-ui-fw-theme.min.css":c=b+"/tizen-web-ui-fw-theme.css",e.css.load(c),e.util.loadScriptSync(d)},loadGlobalizeCulture:function(b,d){function j(b){var d=b||a("html").attr("lang")||c.navigator.language.split(".")[0]||c.navigator.userLanguage||"en",e=null,f=d.lastIndexOf("-"),g=["Cyrl","Latn","Mong"];return f!=-1&&(e=d.substr(f+1),g.join("-").indexOf(e)<0&&(d=[d.substr(0,f),e.toUpperCase()].join("-"))),d=d=="en"?"en-US":d,d}function k(a){var b=a.lastIndexOf("-"),c;return b!=-1&&(c=a.substr(0,b)),c}function l(a,b){var c=null;return"string"!=typeof a?null:(b&&b[a]?c=b[a]:c=[f.frameworkData.rootDir,f.frameworkData.version,"js","cultures",["globalize.culture.",a,".js"].join("")].join("/"),c)}function m(a,b){e.log.error("Error "+b.status+": "+b.statusText+"::Culture file ("+a+") is failed to load.")}function n(b,c){function d(){e.log.debug("Culture file ("+b+") is loaded successfully.")}function f(a,d,e){c?c(a,d,e):m(b,a)}b?a.ajax({url:b,dataType:"script",cache:!0,async:!1,success:d,error:f}):(i={status:404,statusText:"Not Found"},f(i,null,null))}var f=this,g,h,i;return h=j(b),g=l(h,d),n(g,function(a,b,c){if(a.status==404){var e=k(h),f=l(e,d);n(f,null)}else m(g,a)}),h},setGlobalize:function(){var a=this.loadGlobalizeCulture();b.culture(a)},loadCustomGlobalizeCulture:function(a){e.loadGlobalizeCulture(null,a)},setViewport:function(b){var c=null,d,f;return a("meta[name=viewport]").each(function(){c=this;return}),c?(f=a(c).prop("content"),b=f.replace(/.*width=(device-width|\d+)\s*,?.*$/gi,"$1"),e.log.debug("Viewport is set to '"+b+"' in a meta tag. Framework skips viewport setting.")):(c=document.createElement("meta"),c&&(c.name="viewport",f="width="+b+", user-scalable=no",!!isNaN(b),c.content=f,e.log.debug(f),d=document.getElementsByTagName("head").item(0),d.insertBefore(c,d.firstChild))),b},scaleBaseFontSize:function(b,c){e.log.debug("themedefaultfont size: "+b+", ratio: "+c);var d=Math.max(Math.floor(b*c),4);a("html").css({"font-size":d+"px"}),e.log.debug("html:font size is set to "+d),a(document).ready(function(){a(".ui-mobile").children("body").css({"font-size":d+"px"})})},setScaling:function(){var b=this.frameworkData.viewportWidth,d=this.frameworkData.defaultFontSize,f=1;a("body").attr("data-tizen-theme-default-font-size",d);if(!e.util.isMobileBrowser())return;this.frameworkData.viewportScale==1&&(b="screen-width"),"screen-width"==b&&(c.self==c.top?b=c.outerWidth:b=document.documentElement.clientWidth),b=this.setViewport(b),b!="device-width"&&(f=parseFloat(b/this.frameworkData.defaultViewportWidth),this.scaleBaseFontSize(d,f))}};f(a,e),e.getParams(),e.loadTheme(),e.setScaling(),e.setGlobalize(),a.mobile.autoInitializePage=!1,a(document).ready(function(){a.mobile.initializePage()})}(jQuery,window.Globalize,window),function(a,b,c){a.widget("tizen.progressbar",a.mobile.widget,{options:{value:0,max:100},min:0,_create:function(){this.element.addClass("ui-progressbar").attr({role:"progressbar","aria-valuemin":this.min,"aria-valuemax":this.options.max,"aria-valuenow":this._value()}),this.valueDiv=a("<div class='ui-progressbar-value'></div>").appendTo(this.element),this.valueDiv.wrap("<div class='ui-progressbar-bg'></div>"),this.oldValue=this._value(),this._refreshValue()},_destroy:function(){this.element.removeClass("ui-progressbar").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.valueDiv.remove()},value:function(a){return a===c?this._value():(this._setOption("value",a),this)},_setOption:function(a,b){a==="value"&&(this.options.value=b,this._refreshValue(),this._value()===this.options.max&&this.element.trigger("complete"))},_value:function(){var a=this.options.value;return typeof a!="number"&&(a=0),Math.min(this.options.max,Math.max(this.min,a))},_percentage:function(){return 100*this._value()/this.options.max},_refreshValue:function(){var a=this.value(),b=this._percentage();this.oldValue!==a&&(this.oldValue=a,this.element.trigger("change")),this.valueDiv.toggle(a>this.min).width(b.toFixed(0)+"%"),this.element.attr("aria-valuenow",a)}}),a(document).bind("pagecreate",function(b){a(b.target).find(":jqmData(role='progressbar')").progressbar()})}(jQuery,this),function(a,b){a.widget("mobile.pagelayout",a.mobile.widget,{options:{visibleOnPageShow:!0,disablePageZoom:!0,transition:"slide",fullscreen:!1,tapToggle:!0,tapToggleBlacklist:"a, input, select, textarea, .ui-header-fixed, .ui-footer-fixed",hideDuringFocus:"input, textarea, select",updatePagePadding:!0,supportBlacklist:function(){var a=window,c=navigator.userAgent,d=navigator.platform,e=c.match(/AppleWebKit\/([0-9]+)/),f=!!e&&e[1],g=c.match(/Fennec\/([0-9]+)/),h=!!g&&g[1],i=c.match(/Opera Mobi\/([0-9]+)/),j=!!i&&i[1];return(d.indexOf("iPhone")>-1||d.indexOf("iPad")>-1||d.indexOf("iPod")>-1)&&f&&f<534||a.operamini&&{}.toString.call(a.operamini)==="[object OperaMini]"||i&&j<7458||c.indexOf("Android")>-1&&f&&f<533||h&&h<6||window.palmGetResource!==b&&f&&f<534||c.indexOf("MeeGo")>-1&&c.indexOf("NokiaBrowser/8.5.0")>-1?!0:!1},initSelector:":jqmData(role='content')"},_create:function(){var a=this,b=a.options,c=a.element;if(b.supportBlacklist()){a.destroy();return}a._addFixedClass(),a._addTransitionClass(),a._bindPageEvents(),a._bindContentControlEvents(),a._backBtnQueue=[]},_addFixedClass:function(){var a=this,b=a.options,c=a.element,d=c.siblings(":jqmData(role='header')"),e=c.siblings(":jqmData(role='footer')"),f=c.closest(".ui-page");d.addClass("ui-header-fixed"),e.addClass("ui-footer-fixed"),b.fullscreen?(d.addClass("ui-header-fullscreen"),e.addClass("ui-footer-fullscreen"),f.addClass("ui-page-header-fullscreen").addClass("ui-page-footer-fullscreen")):f.addClass("ui-page-header-fixed").addClass("ui-page-footer-fixed")},_addTransitionClass:function(){var a=this.options.transition;a&&a!=="none"&&(a==="slide"&&(a=this.element.is(".ui-header")?"slidedown":"slideup"),this.element.addClass(a))},setHeaderFooter:function(b){var c=a(b),d=c.find(":jqmData(role='header')").length?c.find(":jqmData(role='header')"):c.siblings(":jqmData(role='header')"),e=c.find(".ui-content"),f=c.find(":jqmData(role='footer')"),g=f.find(":jqmData(role='fieldcontain')"),h=f.find(".ui-controlgroup");c.is(".ui-dialog")||(d.jqmData("position")=="fixed"||a.support.scrollview&&a.tizen.frameworkData.theme.match(/tizen/)?d.css("position","fixed").css("top","0px"):!a.support.scrollview&&d.jqmData("position")!="fixed"&&d.css("position","relative")),d.find("span.ui-title-text-sub").length&&d.addClass("ui-title-multiline"),g.find("div").is(".ui-controlgroup-label")&&g.find("div.ui-controlgroup-label").remove();if(h.length){var i=100/h.find("a").length;h.find("a").each
272 (function(a){h.find("a").eq(a).width(i+"%")})}},_bindPageEvents:function(){var b=this,c=b.options,d=b.element,e;d.closest(".ui-page").bind("pagebeforeshow",function(d){var e=this;c.disablePageZoom&&a.mobile.zoom.disable(!0),c.visibleOnPageShow||b.hide(!0),b.setHeaderFooter(e),b._setContentMinHeight(e)}).bind("webkitAnimationStart animationstart updatelayout",function(a,d){var e=this;c.updatePagePadding&&(b.updatePagePadding(e),b.updatePageLayout(e,d))}).bind("pageshow",function(d){var e=this;b._setContentMinHeight(e),b.updatePagePadding(e),b._updateHeaderArea(e),c.updatePagePadding&&a(window).bind("throttledresize."+b.widgetName,function(){b.updatePagePadding(e),b.updatePageLayout(e,!1),b._updateHeaderArea(e),b._setContentMinHeight(e)})}).bind("pagebeforehide",function(d,e){c.disablePageZoom&&a.mobile.zoom.enable(!0),c.updatePagePadding&&a(window).unbind("throttledresize."+b.widgetName)}),window.addEventListener("softkeyboardchange",function(c){var d=a("<div class='ui-btn-footer-down'></div>"),e=a(".ui-page-active"),f,g="footer";e.data("addBackBtn")&&(e.data("addBackBtn")=="header"?g="header":g="footer",c.state=="on"?(e.find(".ui-"+g+" .ui-btn-footer-down").length||d.buttonMarkup({icon:"down"}).appendTo(e.find(".ui-"+g)),f=a(".ui-page-active .ui-btn-back"),f.hide(),b._backBtnQueue.push(f)):c.state=="off"&&(b._backBtnQueue.forEach(function(a){a.show()}),b._backBtnQueue.length=0,a(".ui-btn-footer-down").remove()))})},_bindContentControlEvents:function(){var a=this,b=a.options,c=a.element;c.closest(".ui-page").bind("pagebeforeshow",function(a){})},_setContentMinHeight:function(b){var c=a(b),d=c.find(":jqmData(role='header')"),e=c.find(":jqmData(role='footer')"),f=c.find(":jqmData(role='content')"),g,h=1,i=window.innerHeight;!a.support.scrollview||a.support.scrollview&&f.jqmData("scroll")==="none"?(h=window.outerWidth/window.innerWidth,i=Math.floor(window.outerHeight/h)):i=window.innerHeight,g=i-d.height()-e.height(),a.support.scrollview&&f.jqmData("scroll")!=="none"&&(f.css("min-height",g-parseFloat(f.css("padding-top"))-parseFloat(f.css("padding-bottom"))+"px"),f.children(".ui-scrollview-view").css("min-height",f.css("min-height")))},_updateHeaderArea:function(b){var c=a(b),d=c.find(":jqmData(role='header')").length?c.find(":jqmData(role='header')"):c.siblings(":jqmData(role='header')"),e=d.children("a").length,f=d.children("img").length;c.is(".ui-dialog")||d.find("h1").css("width",window.innerWidth-parseInt(d.find("h1").css("margin-left"),10)*2-d.children("a").width()*e-d.children("a").width()/4-d.children("img").width()*f*4)},_visible:!0,updatePagePadding:function(b){var c=this.element,d=c.siblings(".ui-header").length,e=c.siblings(".ui-footer").length;if(this.options.fullscreen)return;b=b||c.closest(".ui-page"),(c.siblings(".ui-header").jqmData("position")=="fixed"||a.support.scrollview&&c.jqmData("scroll")!=="none")&&a(b).css("padding-top",d?c.siblings(".ui-header").outerHeight():0),a(b).css("padding-bottom",e?c.siblings(".ui-footer").outerHeight():0)},updatePageLayout:function(b,c){var d,e=a(b),f=e.find(":jqmData(role='header')"),g=e.find(":jqmData(role='content')"),h=0,i=0,j=0,k=window.innerHeight,l=1;e.length?d=e.find(":jqmData(role='footer')"):d=a(document).find(":jqmData(role='footer')").eq(0),i=d.css("display")=="none"||d.length==0?0:d.height(),j=f.css("display")=="none"||f.length==0?0:f.height(),i!=0&&d.css("bottom",0),!a.support.scrollview||a.support.scrollview&&g.jqmData("scroll")==="none"?(l=window.outerWidth/window.innerWidth,k=Math.floor(window.outerHeight/l)):k=window.innerHeight,h=k-i-j,a.support.scrollview&&g.jqmData("scroll")!=="none"&&g.height(h-parseFloat(g.css("padding-top"))-parseFloat(g.css("padding-bottom"))),c&&e.css("min-height",h).css("padding-top",j).css("padding-bottom",i)},show:function(a){},hide:function(a){},toggle:function(){this[this._visible?"hide":"show"]()},destroy:function(){this.element.removeClass("ui-header-fixed ui-footer-fixed ui-header-fullscreen ui-footer-fullscreen in out fade slidedown slideup ui-fixed-hidden"),this.element.closest(".ui-page").removeClass("ui-page-header-fixed ui-page-footer-fixed ui-page-header-fullscreen ui-page-footer-fullscreen")},refresh:function(){var b=a(".ui-page-active");this.setHeaderFooter(b),this._updateHeaderArea(b)}}),a(document).bind("pagecreate create",function(b){a(b.target).jqmData("fullscreen")&&a(a.mobile.pagelayout.prototype.options.initSelector,b.target).not(":jqmData(fullscreen)").jqmData("fullscreen",!0),a.mobile.pagelayout.prototype.enhanceWithin(b.target)})}(jQuery),function(a,b,c){a.widget("tizen.tizenslider",a.mobile.widget,{options:{popup:!0},popup:null,handle:null,handleText:null,_create:function(){this.currentValue=null,this.popupVisible=!1;var b=this,d=a(this.element),e,f,g,h,i,j,k,l,m,n,o;d.slider(),d.hide(),b.popup=a('<div class="ui-slider-popup"></div>'),g=d.jqmData("popup"),g!==c&&(b.options.popup=g==1),e=d.next(".ui-slider"),h=d.attr("data-icon"),e.wrap('<div class="ui-slider-container"></div>'),b.handle=e.find(".ui-slider-handle"),e.removeClass("ui-btn-corner-all"),e.find("*").removeClass("ui-btn-corner-all");switch(h){case"bright":case"volume":l=a('<div class="ui-slider-left-'+h+'"></div>'),m=a('<div class="ui-slider-right-'+h+'"></div>'),e.before(l),e.after(m),n=l.width()+16,o=m.width()+16;break;case"text":j=d.attr("data-text-left")===c?"":d.attr("data-text-left").substring(0,3),i=d.attr("data-text-right")===c?"":d.attr("data-text-right").substring(0,3),k=Math.max(j.length,i.length)+1,n=k+"rem",o=k+"rem",l=a('<div class="ui-slider-left-text" style="left:'+ -k+"rem; width:"+k+'rem;">'+'<span style="position:relative;top:0.4em;">'+j+"</span></div>"),m=a('<div class="ui-slider-right-text" style="right:'+ -k+"rem; width:"+k+'rem;">'+'<span style="position:relative;top:0.4em;">'+i+"</span></div>"),e.before(l),e.after(m)}h&&e.parent(".ui-slider-container").css({"margin-left":n,"margin-right":o}),e.append(a('<div class="ui-slider-handle-press"></div>')),b.handle_press=e.find(".ui-slider-handle-press"),b.handle_press.css("display","none"),e.parents(".ui-page").append(b.popup),b.popup.hide(),b.handleText=e.find(".ui-btn-text"),b.updateSlider(),this.element.on("change",function(){b.updateSlider(),b.showPopup()}),this.element.on("slidestart",function(a){b.updateSlider(),b.showPopup()}),b.handle.on("vmousedown",function(){b.showPopup()}),e.add(document).on("vmouseup",function(){b.hidePopup()})},_handle_press_show:function(){this.handle_press.css("display","")},_handle_press_hide:function(){this.handle_press.css("display","none")},positionPopup:function(){var a=this.handle.offset();this.popup.offset({left:a.left+(this.handle.width()-this.popup.width())/2,top:a.top-this.popup.height()}),this.handle_press.offset({left:a.left,top:a.top})},updateSlider:function(){var a,b,c,d,e,f=function(a){var b=Math.abs(a),c;return b>999?c=4:b>99?c=3:b>9?c=2:c=1,a<0&&c++,c};this.handle.removeAttr("title"),e=this.element.val(),b=f(e);if(this.popupVisible){this.positionPopup();switch(b){case 1:case 2:a="1.5rem",d="0.15rem";break;case 3:a="1rem",d="0.5rem";break;default:a="0.8rem",d="0.5rem"}this.popup.css({"font-size":a,"padding-top":d})}if(e===this.currentValue)return;switch(b){case 1:a="0.95rem",c="0";break;case 2:a="0.85rem",c="-0.01rem";break;case 3:a="0.65rem",c="-0.05rem";break;default:a="0.45rem",c="-0.15rem"}a!=this.handleText.css("font-size")&&this.handleText.css({"font-size":a,top:c}),this.currentValue=e,this.handleText.text(e),this.popup.html(e),this.element.trigger("update",e)},showPopup:function(){if(!this.options.popup||this.popupVisible)return;this.popup.show(),this.popupVisible=!0,this._handle_press_show()},hidePopup:function(){if(!this.options.popup||!this.popupVisible)return;this.popup.hide(),this.popupVisible=!1,this._handle_press_hide()},_setOption:function(a,b){var c=b!==this.options[a];if(!c)return;switch(a){case"popup":this.options.popup=b,this.options.popup?this.updateSlider():this.hidePopup()}}}),a(document).on("pagebeforecreate",function(d){a.data(b,"jqmSliderInitSelector")===c&&(a.data(b,"jqmSliderInitSelector",a.mobile.slider.prototype.options.initSelector),a.mobile.slider.prototype.options.initSelector=null)}),a(document).on("pagecreate create",function(c){var d=a.data(b,"jqmSliderInitSelector");a(c.target).find(d).each(function(){var b=a(this);b.is("select")?b.slider():b.tizenslider()})})}(jQuery,this),function(a){a.widget("tizen.swipe",a.mobile.widget,{options:{theme:null},_create:function(){var a=this.element.jqmData("theme")||this.options.theme||this.element.parent().jqmData("theme")||"s";this.options.theme=a,this._isopen=!1,this.refresh()},refresh:function(){this._cleanupDom();var b=this,c,d,e,f,g;c="ui-body-"+this.options.theme,this.element.parent().hasClass("ui-listview")||this.element.parent().listview(),this.element.addClass("ui-swipe"),d=this.element.find(':jqmData(role="swipe-item-cover")'),f=this.element.find(':jqmData(role="swipe-item")'),this._covers=d,this._item=f,f.addClass("ui-swipe-item"),e=c,g=f.parent().attr("class").match(/ui\-body\-[a-z]|ui\-bar\-[a-z]/),d.each(function(){var c=a(this);g&&(e=g[0]),c.addClass("ui-swipe-item-cover"),c.addClass(e),c.has(".ui-swipe-item-cover-inner").length===0&&c.wrapInner(a("<span/>").addClass("ui-swipe-item-cover-inner"));if(!c.data("animateRight")||!c.data("animateLeft"))c.data("animateRight",function(){b._animateCover(c,110,f)}),c.data("animateLeft",function(){b._animateCover(c,0,f)});f.bind("swipeleft",c.data("animateLeft")),c.bind("swiperight",c.data("animateRight")),f.find(".ui-btn").bind("vclick",c.data("animateLeft"))})},_cleanupDom:function(){var a=this,b,c,d=b,e,f,g,h,i;b="ui-body-"+this.options.theme,this.element.removeClass("ui-swipe"),c=this.element.find(':jqmData(role="swipe-item-cover")'),e=this.element.find(':jqmData(role="swipe-item")'),e.removeClass("ui-swipe-item"),c.removeClass("ui-swipe-item-cover"),f=e.attr("class"),g=f&&f.match(/ui\-body\-[a-z]|ui\-bar\-[a-z]/),g&&(d=g[0]),c.removeClass(d),i=c.find(".ui-swipe-item-cover-inner"),i.children().unwrap(),h=i.text(),h&&(c.append(h),i.remove()),c.data("animateRight")&&c.data("animateLeft")&&(c.unbind("swiperight",c.data("animateRight")),e.unbind("swipeleft",c.data("animateLeft")),e.find(".ui-btn").unbind("vclick",c.data("animateLeft")),c.data("animateRight",null),c.data("animateLeft",null))},_animateCover:function(b,c,d){var e=this,f={easing:"linear",duration:"normal",queue:!0,complete:function(){b.trigger("animationend")}};a(this.element.parent()).find(":jqmData(role='swipe')").each(function(){this!==e.element.get(0)&&a(this).swipe("opened")&&a(this).swipe("close")}),c==110?this._isopen=!0:this._isopen=!1,b.stop(),b.clearQueue(),b.trigger("animationstart"),b.animate({left:c+"%"},f),c==0?d.animate({opacity:0},"slow"):d.animate({opacity:1},"slow")},destroy:function(){this._cleanupDom()},open:function(){var b=this;a(b._covers).each(function(){var c=a(this);b._animateCover(c,110,b._item)})},opened:function(){return this._isopen},close:function(){var b=this;a(b._covers).each(function(){var c=a(this);b._animateCover(c,0,b._item)})}}),a(document).bind("pagecreate",function(b){a(b.target).find(":jqmData(role='swipe')").swipe()})}(jQuery),function(a,b){a.widget("tizen.notification",a.mobile.widget,{btn:null,text_bg:[],icon_img:[],interval:null,seconds:null,running:!1,_get_text:function(){var b=new Array(2);return this.type==="ticker"?(b[0]=a(this.text_bg[0]).text(),b[1]=a(this.text_bg[1]).text()):b[0]=a(this.text_bg[0]).text(),b},_set_text:function(b,c){var d=function(a,b){if(!b)return;a.text(b)};this.type==="ticker"?(d(a(this.text_bg[0]),b),d(a(this.text_bg[1]),c)):d(a(this.text_bg[0]),b)},text:function(a,b){if(a===undefined&&b===undefined)return this._get_text();this._set_text(a,b)},icon:function(b){if(b===undefined)return;this.icon_img.detach(),this.icon_img=a("<img src='"+b+"' class='ui-ticker-icon'>"),a(this.element).find(".ui-ticker").append(this.icon_img)},_refresh:function(){var b=this._get_container();a(b).addClass("fix").removeClass("show").removeClass("hide"),this._set_interval()},open:function(){var b=this._get_container();if(this.running){this._refresh();return}a(b).addClass("show").removeClass("hide").removeClass("fix"),this.running=!0,this.type==="popup"&&this._set_position(),this._set_interval()},close:function(){var b=this._get_container();if(!this.running)return;a(b).addClass("hide").removeClass("show").removeClass("fix"),this.running=!1,clearInterval(this.interval)},destroy:function(){var b=this._get_container();a(b).removeClass("show").removeClass("hide").removeClass("fix"),this._del_event(),this.running=!1},_get_container:function(){return this.type==="ticker"?a(this.element).find(".ui-ticker"):a(this.element).find(".ui-smallpopup")},_set_interval:function(){var a=this;clearInterval(this.interval),this.seconds!==undefined&&this.second!==0&&(this.interval=setInterval(function(){a.close()},this.seconds))},_add_event:function(){var a=this,b=this._get_container();this.type==="ticker"&&(b.find(".ui-ticker-btn").append(this.btn).trigger("create"),this.btn.bind("vmouseup",function(){a.close()})),b.bind("vmouseup",function(){a.close()})},_del_event:function(){var a=this._get_container();this.type==="ticker"&&this.btn.unbind("vmouseup"),a.unbind("vmouseup"),clearInterval(this.interval)},_set_position:function(){var b=this._get_container(),c=a(".ui-page-active").children(".ui-footer"),d=c.outerHeight()||0;b.css("bottom",d)},_create:function(){var c=this,d=a(this.element),e;this.btn=a('<div data-role="button" data-inline="true">Close</div>'),this.seconds=d.jqmData("interval"),this.type=d.jqmData("type")||"popup";if(this.type==="ticker"){d.wrapInner("<div class='ui-ticker'></div>"),d.find(".ui-ticker").append("<div class='ui-ticker-body'></div><div class='ui-ticker-btn'></div>"),this.text_bg=d.find("p");if(this.text_bg.length<2)d.find(".ui-ticker").append("<p></p><p></p>"),this.text_bg=d.find("p");else if(this.text_bg.length>2)for(e=2;e<this.text_bg.length;e++)a(this.text_bg[e]).css("display","none");a(this.text_bg[0]).addClass("ui-ticker-text1-bg"),a(this.text_bg[1]).addClass("ui-ticker-text2-bg"),this.icon_img=d.find("img");if(this.icon_img.length){a(this.icon_img).addClass("ui-ticker-icon");for(e=1;e<this.icon_img.length;e++)a(this.icon_img[e]).css("display","none")}}else{d.wrapInner("<div class='ui-smallpopup'></div>"),this.text_bg=d.find("p").addClass("ui-smallpopup-text-bg");if(this.text_bg.length<1)d.find(".ui-smallpopup").append("<p class='ui-smallpopup-text-bg'></p>"),this.text_bg=d.find("p");else if(this.text_bg.length>1)for(e=1;e<this.text_bg.length;e++)a(this.text_bg[e]).css("display","none");this._set_position()}this._add_event(),a(b).bind("resize",function(){if(!c.running)return;c._refresh(),c.type==="popup"&&c._set_position()})}}),a(document).bind("pagecreate create",function(b){a(b.target).find(":jqmData(role='notification')").notification()}),a(document).bind("pagebeforehide",function(b){a(b.target).find(":jqmData(role='notification')").notification("destroy")})}(jQuery,this),function(a,b){a.widget("tizen.popupwindow",a.tizen.widgetex,{options:{theme:null,overlayTheme:"s",style:"custom",disabled:!1,shadow:!0,corners:!0,fade:!1,opacity:.7,widthRatio:.8612,transition:a.mobile.defaultDialogTransition,initSelector:":jqmData(role='popupwindow')"},_htmlProto:{source:["<div><div>","    <div id='popupwindow-screen' class='ui-selectmenu-screen ui-screen-hidden ui-popupwindow-screen'></div>","    <div id='popupwindow-container' class='ui-popupwindow ui-popupwindow-padding ui-selectmenu-hidden ui-overlay-shadow ui-corner-all'></div>","</div>","</div>"].join(""),ui:{screen:"#popupwindow-screen",container:"#popupwindow-container"}},_setStyle:function(){var a=this.element,b=a.attr("data-style");b&&(this.options.style=b),a.addClass(this.options.style),a.find(":jqmData(role='title')").wrapAll("<div class='popup-title'></div>"),a.find(":jqmData(role='text')").wrapAll("<div class='popup-text'></div>"),a.find(":jqmData(role='button-bg')").wrapAll("<div class='popup-button-bg'></div>"),a.find(":jqmData(role='check-bg')").wrapAll("<div class='popup-check-bg'></div>"),a.find(":jqmData(role='scroller-bg')").addClass("popup-scroller-bg"),a.find(":jqmData(role='text-bottom-bg')").wrapAll("<div class='popup-text-bottom-bg'></div>"),a.find(":jqmData(role='text-left')").wrapAll("<div class='popup-text-left'></div>"),a.find(":jqmData(role='text-right')").wrapAll("<div class='popup-text-right'></div>"),a.find(":jqmData(role='progress-bg')").wrapAll("<div class='popup-progress-bg'></div>")},_create:function(){console.warn("popupwindow() was deprecated. use popup() instead.");var b=this.element.closest(":jqmData(role='page')"),c=this;b.length===0&&(b=a("body")),this._ui.placeholder=a("<div><!-- placeholder for "+this.element.attr("id")+" --></div>").css("display","none").insertBefore(this.element),b.append(this._ui.screen),this._ui.container.insertAfter(this._ui.screen),this._ui.container.append(this.element),this._setStyle(),this._isOpen=!1,this._ui.screen.bind("vclick",function(a){return c.close(),!1}),this.element.bind("vclick",function(b){a(b.target).is("ui-btn-ctxpopup-close")&&c.close()})},destroy:function(){this.element.insertBefore(this._ui.placeholder),this._ui.placeholder.remove(),this._ui.container.remove(),this._ui.screen.remove(),this.element.triggerHandler("destroyed"),a.Widget.prototype.destroy.call(this)},_placementCoords:function(b,c,d,e){var f=a(window).height(),g=a(window).width(),h=e/2,i=parseFloat(this._ui.container.css("max-width")),j=c,k=f-c,l,m;return j>e/2&&k>e/2?l=c-h:l=j>k?f-e-30:30,d<i?m=(g-d)/2:(m=b-d/2,m<10?m=10:m+d>g&&(m=g-d-10)),{x:m,y:l}},_setPosition:function(c,d){var e=b===c?a(window).width()/2:c,f=b===d?a(window).height()/2:d,g,h=this.element.data("ctxpopup"),i,j,k,l,m,n,o,p,q,r,s;h||(i=a(window).width()*this.options.widthRatio,this._ui.container.css("width",i),this._ui.container.outerWidth()>a(window).width()&&this._ui.container.css({"max-width":a(window).width()-30})),g=this._placementCoords(e,f,this._ui.container.outerWidth(),this._ui.container.outerHeight()),j=this._ui.container.innerHeight(),k=this._ui.container.innerWidth(),l=a(window).height(),m=a(window).width(),n=f,o=l-f,p=j/2,q=parseFloat(this._ui.container.css("max-width")),r=(l-j)/2,!q||k<q?s=(m-k)/2:(s=e-k/2,s<30?s=30:s+k>m&&(s=m-k-30)),h&&(r=g.y,s=g.x),this._ui.container.css({top:r,left:s}),this._ui.screen.css("height",l)},open:function(b,c,d){var e=this,f=0;if(this._isOpen||this.options.disabled)return;a(document).find("*").each(function(){var b=a(this),c=parseInt(b.css("z-index"),10);b.is(e._ui.container)||b.is(e._ui.screen)||isNaN(c)||(f=Math.max(f,c))}),this._ui.screen.css("height",a(window).height()),d?this._ui.screen.css("opacity",0).removeClass("ui-screen-hidden"):(this._ui.removeClass("ui-screen-hidden"),this.options.fade?this._ui.screen.animate({opacity:this.options.opacity},"fast"):this._ui.screen.css({opacity:this.options.opacity})),this._setPosition(b,c),this.element.trigger("popupbeforeposition"),this._ui.container.removeClass("ui-selectmenu-hidden").addClass("in").animationComplete(function(){e.element.trigger("popupafteropen")}),this._isOpen=!0,this._reflow||(this._reflow=function(){if(!e._isOpen)return;e._setPosition(b,c)},a(window).bind("resize",this._reflow))},close:function(){if(!this._isOpen)return;this._reflow&&(a(window).unbind("resize",this._reflow),this._reflow=null);var b=this,c=function(){b._ui.screen.addClass("ui-screen-hidden"),b._isOpen=!1};this._ui.container.removeClass("in").addClass("reverse out"),this.options.transition==="none"?(this._ui.container.addClass("ui-selectmenu-hidden").removeAttr("style"),this.element.trigger("popupafterclose")):this._ui.container.animationComplete(function(){b._ui.container.removeClass("reverse out").addClass("ui-selectmenu-hidden").removeAttr("style"),b.element.trigger("popupafterclose")}),this.options.fade?this._ui.screen.animate({opacity:0},"fast",c):c()},_realSetTheme:function(a,b){var c=(a.attr("class")||"").split(" "),d=!0,e=null,f;while(c.length>0){e=c.pop(),f=e.match(/^ui-body-([a-z])$/);if(f&&f.length>1){e=f[1];break}e=null}a.removeClass("ui-body-"+e),(b||"").match(/[a-z]/)&&a.addClass("ui-body-"+b)},_setTheme:function(b){this._realSetTheme(this.element,b),this.options.theme=b,this.element.attr("data-"+(a.mobile.ns||"")+"theme",b)},_setOverlayTheme:function(b){this._realSetTheme(this._ui.container,b),this.options.overlayTheme=b,this.element.attr("data-"+(a.mobile.ns||"")+"overlay-theme",b)},_setShadow:function(b){this.options.shadow=b,this.element.attr("data-"+(a.mobile.ns||"")+"shadow",b),this._ui.container[b?"addClass":"removeClass"]("ui-overlay-shadow")},_setCorners:function(b){this.options.corners=b,this.element.attr("data-"+(a.mobile.ns||"")+"corners",b),this._ui.container[b?"addClass":"removeClass"]("ui-corner-all")},_setFade:function(b){this.options.fade=b,this.element.attr("data-"+(a.mobile.ns||"")+"fade",b)},_setTransition:function(b){this._ui.container.removeClass(this.options.transition||"").addClass(b),this.options.transition=b,this.element.attr("data-"+(a.mobile.ns||"")+"transition",b)},_setDisabled:function(b){a.Widget.prototype._setOption.call(this,"disabled",b),b&&this.close()}}),a.tizen.popupwindow.bindPopupToButton=function(a,b){if(a.length===0||b.length===0)return;var c=function(c){return b.jqmData("overlay-theme-set")||b.popupwindow("option","overlayTheme",a.jqmData("theme")),b.popupwindow("open",a.offset().left+a.outerWidth()/2,a.offset().top+a.outerHeight()/2),!1};(b.popupwindow("option","overlayTheme")||"").match(/[a-z]/)&&b.jqmData("overlay-theme-set",!0),a.attr({"aria-haspopup":!0,"aria-owns":a.attr("href")}).removeAttr("href").bind("vclick",c),b.bind("destroyed",function(){a.unbind("vclick",c)})},a(document).bind("pagecreate create",function(b){a(a.tizen.popupwindow.prototype.options.initSelector,b.target).not(":jqmData(role='none'), :jqmData(role='nojs')").popupwindow(),a("a[href^='#']:jqmData(rel='popupwindow')",b.target).each(function(){a.tizen.popupwindow.bindPopupToButton(a(this),a(a(this).attr("href")))})})}(jQuery),function(a,b){a.widget("tizen.searchbar",a.mobile.widget,{options:{theme:null,initSelector:"input[type='search'],:jqmData(type='search'), input[type='tizen-search'],:jqmData(type='tizen-search')"},_create:function(){function t(){setTimeout(function(){h.toggleClass("ui-input-clear-hidden",!c.val())},0)}function u(){g.addClass("ui-input-search-default").removeClass("ui-input-search-wide"),i.addClass("ui-btn-cancel-show").removeClass("ui-btn-cancel-hide")}function v(){g.addClass("ui-input-search-wide").removeClass("ui-input-search-default"),i.addClass("ui-btn-cancel-hide").removeClass("ui-btn-cancel-show"),t()}function w(){var b=a(c).jqmData("icon"),d=a("<div data-role='button' data-style='circle'></div>");d.appendTo(g.parent()).buttonMarkup({icon:b,iconpos:"notext",corners:!0,shadow:!0}),d.addClass("ui-btn-search-front-icon")}var c=this.element,d=this.options,e=d.theme||a.mobile.getInheritedTheme(this.element,"c"),f=" ui-body-"+e,g,h,i,j,k,l,m,n,o,p,q,r=!1,s=!1;a("label[for='"+c.attr("id")+"']").addClass("ui-input-text"),typeof c[0].autocorrect!="undefined"&&!a.support.touchOverflow&&(c[0].setAttribute("autocorrect","off"),c[0].setAttribute("autocomplete","off")),g=c.wrap("<div class='ui-input-search ui-shadow-inset ui-corner-all ui-btn-shadow"+f+"'></div>").parent(),a(this.element).data("cancel-btn")===!0&&(r=!0,g.addClass("ui-input-search-default")),a(this.element).data("icon")!=b&&(s=!0,g.addClass("ui-search-bar-icon")),h=a("<a href='#' class='ui-input-clear' title='clear text'>clear text</a>").bind("click",function(a){if(c.attr("disabled")=="disabled")return!1;c.val("").focus().trigger("change"),h.addClass("ui-input-clear-hidden"),a.preventDefault()}).appendTo(g).buttonMarkup({icon:"deleteSearch",iconpos:"notext",corners:!0,shadow:!0}),t(),c.bind("paste cut keyup focus change blur",t),g.wrapAll("<div class='input-search-bar'></div>"),p=a("<div class='ui-image-search'></div>").appendTo(g),s&&w(),r&&(i=a("<div data-role='button' class='ui-input-cancel' title='clear text'>Cancel</div>").bind("click",function(a){if(c.attr("disabled")=="disabled")return!1;a.preventDefault(),a.stopPropagation(),c.val("").blur().trigger("change"),r&&v()}).appendTo(g.parent()).buttonMarkup({iconpos:"cancel",corners:!0,shadow:!0})),c.focus(function(){if(c.attr("disabled")=="disabled")return!1;r&&u(),g.addClass(a.mobile.focusClass)}).blur(function(){g.removeClass(a.mobile.focusClass)}),j=c.jqmData("default-text"),j!=b&&j.length>0&&(k="ui-input-default-text",l=j.replace(/\s/g,""),m=k+"-"+l,n=a("<style>."+m+":after"+"{content:"+"'"+j+"'"+"}"+"</style>"),a("html > head").append(n),o=a("<div></div>"),o.addClass(k),o.addClass(m),o.tap(function(a){c.blur(),c.focus()}),c.parent().append(o),c.focus(function(){c.parent().find("div.ui-input-default-text").addClass("ui-input-default-hidden")}).blur(function(){var a=c.val();a.length>0?c.parent().find("div.ui-input-default-text").addClass("ui-input-default-hidden"):c.parent().find("div.ui-input-default-text").removeClass("ui-input-default-hidden")})),c.attr("placeholder")||c.attr("placeholder","Search")},disable:function(){this.element.attr("disabled",!0),this.element.parent().addClass("ui-disabled"),a(this.element).blur(),this.element.parent().parent().find(".ui-input-cancel").addClass("ui-disabled")},enable:function(){this.element.attr("disabled",!1),this.element.parent().removeClass("ui-disabled"),this.element.parent().parent().find(".ui-input-cancel").removeClass("ui-disabled"),a(this.element).focus()}}),a(document).bind("pagecreate create",function(b){a.tizen.searchbar.prototype.enhanceWithin(b.target)})}(jQuery),function(a,b){a.widget("tizen.tabbar",a.mobile.widget,{options:{iconpos:"top",grid:null,defaultList:4,initSelector:":jqmData(role='tabbar')"},_create:function(){var c=this.element,d,e,f,g=a.mobile.listview.prototype.options.theme,h=window.innerWidth||a(window).width(),i=window.innerHeight||a(window).height(),j="<div class='ui-tabbar-divider ui-tabbar-divider-left'></div>",k="<div class='ui-tabbar-divider ui-tabbar-divider-right'></div>",l;l=h>i&&h-i,l?c.removeClass("ui-portrait-tabbar").addClass("ui-landscape-tabbar"):c.removeClass("ui-landscape-tabbar").addClass("ui-portrait-tabbar"),c.find("a").length&&(d=c.find("a"),f=d.filter(":jqmData(icon)").length?this.options.iconpos:b,e=d.html().length?!0:!1),c.parents(".ui-header").length&&c.parents(".ui-scrollview-view").length?(c.find("li").addClass("tabbar-scroll-li"),c.find("ul").addClass("tabbar-scroll-ul"),a(j).appendTo(c.parents(".ui-scrollview-clip")),a(k).appendTo(c.parents(".ui-scrollview-clip")),a(".ui-tabbar-divider-left").hide(),a(".ui-tabbar-divider-right").hide(),c.parents(".ui-scrollview-view").data("default-list")&&(this.options.defaultList=c.parents(".ui-scrollview-view").data("default-list")),c.find("li").css("width",window.innerWidth/this.options.defaultList+"px")):c.find("ul").children().length&&c.addClass("ui-navbar").find("ul").grid({grid:this.options.grid}),c.parents(".ui-footer").length&&c.find("li").addClass("ui-tab-btn-style"),c.siblings(".ui-title").length&&c.parents(".ui-header").addClass("ui-title-tabbar"),f||c.addClass("ui-tabbar-noicons"),e||c.addClass("ui-tabbar-notext"),e&&f&&c.parents(".ui-header").addClass("ui-title-tabbar-multiline"),c.find("a").length&&d.buttonMarkup({corners:!1,shadow:!1,iconpos:f}),c.find(".ui-state-persist").length&&c.addClass("ui-tabbar-persist"),c.delegate("a","vclick",function(b){d.not(".ui-state-persist").removeClass(a.mobile.activeBtnClass),a(this).addClass(a.mobile.activeBtnClass)}),c.addClass("ui-tabbar"),a(document).bind("pagebeforeshow",function(b,c){var d=a(b.target).find(":jqmData(role='footer')"),e=d.find(":jqmData(role='tabbar')"),f=e.siblings(":jqmData(icon='naviframe-more')"),g=e.siblings(".ui-btn-back");d.css("position","fixed").css("bottom",0).css("height",e.height()),f.length&&e.addClass("ui-tabbar-margin-more"),g.length&&e.addClass("ui-tabbar-margin-back")}),c.bind("touchstart vmousedown",function(b){var c=a(b.target).parents(".ui-scrollview-view");c.offset()&&(c.offset().left<0?a(".ui-tabbar-divider-left").show():a(".ui-tabbar-divider-left").hide(),c.width()-c.parents(".ui-scrollview-clip").width()==Math.abs(c.offset().left)?a(".ui-tabbar-divider-right").hide():a(".ui-tabbar-divider-right").show())}),this._bindTabbarEvents(),this._initTabbarAnimation()},_initTabbarAnimation:function(){var b=!1,c=!1;a(document).bind("scrollstart.tabbar",function(d){a(d.target).find(".ui-tabbar").length&&(b=!0,c=!1)}),a(document).bind("scrollstop.tabbar",function(d){var e=a(d.target),f=a(d.target).find(".ui-tabbar"),g=a(d.target).find(".ui-tabbar li"),h=g.eq(0),i,j=-1;c=!0,f.length&&b==1&&(i=Math.abs(g.eq(0).offset().left),g.each(function(a){var b=g.eq(a).offset();Math.abs(b.left)<i&&(i=Math.abs(b.left),j=a,h=g.eq(a))}),e.length&&b==c&&j!=-1&&(b=!1,e.scrollview("scrollTo",-(window.innerWidth/f.data("defaultList")*j),0,357))),a(".ui-tabbar-divider-left").hide(),a(".ui-tabbar-divider-right").hide()})},_bindTabbarEvents:function(){var b=this.element;a(window).bind("orientationchange",function(c,d){var e=window.innerWidth||a(window).width(),f=window.innerHeight||a(window).height(),g=e>f&&e-f;g?b.removeClass("ui-portrait-tabbar").addClass("ui-landscape-tabbar"):b.removeClass("ui-landscape-tabbar").addClass("ui-portrait-tabbar")})},_setDisabled:function(a,b){this.element.find("li").eq(b).attr("disabled",a),this.element.find("li").eq(b).attr("aria-disabled",a)},disable:function(a){this._setDisabled(!0,a),this.element.find("li").eq(a).addClass("ui-disabled")},enable:function(a){this._setDisabled(!1,a),this.element.find("li").eq(a).removeClass("ui-disabled")}}),a(document).bind("pagecreate create",function(b){a(a.tizen.tabbar.prototype.options.initSelector,b.target).tabbar()})}(jQuery),function(a,b){a.widget("tizen.ctxpopup",a.tizen.widgetex,{options:a.extend({},a.tizen.popupwindow.prototype.options,{initSelector:":jqmData(show-arrow)"}),_htmlProto:{source:["<div><div id='outer' class='ui-ctxpopup'>","    <div id='top' class='ui-ctxpopup-row' data-role='triangle' data-location='top'></div>","    <div class='ui-ctxpopup-row'>","        <div id='left' class='ui-ctxpopup-cell' data-role='triangle' data-location='left'></div>","        <div id='container' class='ui-ctxpopup-cell'></div>","        <div id='right' class='ui-ctxpopup-cell' data-role='triangle' data-location='right'></div>","    </div>","    <div id='bottom' class='ui-ctxpopup-row' data-role='triangle' data-location='bottom'></div>","</div>","</div>"].join(""),ui:{outer:"#outer",container:"#container",arrow:{all:":jqmData(role='triangle')",l:"#left",t:"#top",r:"#right",b:"#bottom"}}},_create:function(){console.warn("ctxpopup() was deprecated. use popup() instead."),this.element.data("popupwindow")||this.element.popupwindow(),this.element.data("popupwindow")._ui.container.removeClass("ui-popupwindow-padding").append(this._ui.outer),this._ui.outer.trigger("create"),this._ui.container.addClass("ui-popupwindow-padding").append(this.element)},_setOption:function(b,c){a.tizen.popupwindow.prototype._setOption.apply(this.element.data("popupwindow"),arguments),this.options[b]=c}});var c=a.tizen.popupwindow.prototype.open,d=a.tizen.popupwindow.prototype._setOption,e=a.tizen.popupwindow.prototype._placementCoords;a.tizen.popupwindow.prototype._setOption=function(a,b){var c=this.element.data("ctxpopup"),e=!0,f;if(c){if("shadow"===a||"overlayTheme"===a||"corners"===a)f=this._ui.container,this._ui.container=c._ui.container,d.apply(this,arguments),this._ui.container=f,e=!1;c.options[a]=b}e&&d.apply(this,arguments)},a.tizen.popupwindow.prototype._placementCoords=function(c,d,f,g){function m(a,b,f){h._ui.arrow.all.hide(),h._ui.arrow[a].show();var g="b"===a||"t"===a,j=g?{point:"x",size:"cx",beg:"left",outerSize:"outerWidth",niceSize:"width",triangleSize:"height"}:{point:"y",size:"cy",beg:"top",outerSize:"outerHeight",niceSize:"height",triangleSize:"width"},k={cx:i._ui.container.width(),cy:i._ui.container.height()},l={cx:k.cx/2,cy:k.cy/2},m={x:c+l.cx*b,y:d+l.cy*f},n=e.call(i,m.x,m.y,k.cx,k.cy),o=h._ui.arrow[a].offset()[j.beg],p=h._ui.arrow[a][j.outerSize](!0),q=i.element.offset()[j.beg],r=i.element[j.outerSize](!0),s=h._ui.arrow[a][j.triangleSize](),t=Math.max(s+Math.max(0,q-o),Math.min(p-s-Math.max(0,o+p-(q+r)),p/2+m[j.point]-n[j.point]-l[j.size])),u={x:n.x+(g?t:0)+("r"===a?k.cx:0),y:n.y+(g?0:t)+("b"===a?k.cy:0)},v={actual:n,triangleOffset:t,absDiff:Math.abs(c-u.x)+Math.abs(d-u.y)};return h._ui.arrow[a].hide(),v}var h=this.element.data("ctxpopup"),i=this,j={},k,l;return h?(j={l:m("l",1,0),r:m("r",-1,0),t:m("t",0,1),b:m("b",0,-1)},a.each(j,function(a,c){if(k===b||c.absDiff<k)k=c.absDiff,l=a}),h._ui.arrow[l].show().triangle("option","offset",j[l].triangleOffset
273 ),j[l].actual):e.call(this,c,d,f,g)},a.tizen.popupwindow.prototype.open=function(b,d){var e=this.element.data("ctxpopup");e&&(this._setFade(!1),this._setShadow(!1),this._setCorners(!1),this._setOverlayTheme(null),this._setOption("overlayTheme",e.options.overlayTheme),e._ui.arrow.all.triangle("option","color",e._ui.container.css("background-color")),a(".ui-popupwindow").css("background","none")),c.call(this,b,d,!0)},a(document).bind("pagecreate create",function(b){var c=a(a.tizen.ctxpopup.prototype.options.initSelector,b.target);a.tizen.ctxpopup.prototype.enhanceWithin(b.target)})}(jQuery),function(a,b,c){a.widget("tizen.datetimepicker",a.tizen.widgetex,{options:{type:null,format:null,date:null,initSelector:"input[type='date'], input[type='datetime'], input[type='time'], :jqmData(role='datetimepicker')"},container:null,_calendar:function(){return b.Globalize.culture().calendars.standard},_value:{attr:"data-"+(a.mobile.ns||"")+"date",signal:"date-changed"},_daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],_isLeapYear:function(a){return a%4?0:a%100?1:a%400?0:1},_makeTwoDigits:function(a){var b=a.toString(10);return a<10&&(b="0"+b),b},_setType:function(b){switch(b){case"datetime":case"date":case"time":this.options.type=b;break;default:this.options.type="datetime"}return this.element.attr("data-"+(a.mobile.ns?a.mobile.ns+"-":"")+"type",this.options.type),this.options.type},_setFormat:function(b){if(this.options.format==b)return;this.options.format=b,this.ui.children().remove();var c=this._parsePattern(b),d=document.createElement("div"),e,f,g,h,i=this;while(c.length>0){e=c.shift(),f='<span class="ui-datefield-%1" data-pat="'+e+'">%2</span>';switch(e){case"H":case"HH":case"h":case"hh":a(d).append(f.replace("%1","hour"));break;case"mm":case"m":this.options.type=="date"?a(d).append(f.replace("%1","month")):a(d).append(f.replace("%1","min"));break;case"ss":case"s":a(d).append(f.replace("%1","sec"));break;case"d":case"dd":a(d).append(f.replace("%1","day"));break;case"M":case"MM":case"MMM":case"MMMM":a(d).append(f.replace("%1","month"));break;case"yy":case"yyyy":a(d).append(f.replace("%1","year"));break;case"t":case"tt":h='<a href="#" class="ui-datefield-period" data-role="button" data-inline="true">period</a>',a(d).append(h);break;case"g":case"gg":a(d).append(f.replace("%1","era").replace("%2",this._calendar().eras.name));break;case"\t":a(d).append(f.replace("%1","tab").replace("%2",e));break;default:a(d).append(f.replace("%1","seperator").replace("%2",e))}}return this.ui.append(d),this.options.date&&this._setDate(this.options.date),this.ui.find(".ui-datefield-period").buttonMarkup().bind("vclick",function(a){return i._switchAmPm(i),!1}),this.element.attr("data-"+(a.mobile.ns?a.mobile.ns+"-":"")+"format",this.options.format),this.options.format},_setDate:function(b){function i(){return b.getMonth()+1}typeof b=="string"&&(b=new Date(b));var c=a("span,a",this.ui),d,e,f,g,h;for(h=0;h<c.length;h++){f=a(c[h]),d=f.attr("class").match(/ui-datefield-([\w]*)/),d||(d="");switch(d[1]){case"hour":e=b.getHours;break;case"min":e=b.getMinutes;break;case"sec":e=b.getSeconds;break;case"year":e=b.getFullYear;break;case"month":e=i;break;case"day":e=b.getDate;break;case"period":e=b.getHours()<12?this._calendar().AM[0]:this._calendar().PM[0],g=f.find(".ui-btn-text"),g.length==0?f.text(e):g.text()!=e&&g.text(e),e=null;break;default:e=null}e&&this._updateField(f,e.call(b))}return this.options.date=b,this._setValue(b),this.element.attr("data-"+(a.mobile.ns?a.mobile.ns+"-":"")+"date",this.options.date),this.options.date},destroy:function(){this.ui&&this.ui.remove(),this.element&&this.element.show()},value:function(a){function b(a,b){return b._makeTwoDigits(a.getHours())+":"+b._makeTwoDigits(a.getMinutes())+":"+b._makeTwoDigits(a.getSeconds())}function c(a,b){return(a.getFullYear()%1e4+1e4).toString().substr(1)+"-"+b._makeTwoDigits(a.getMonth()+1)+"-"+b._makeTwoDigits(a.getDate())}var d=null;if(a)d=this._setDate(a);else switch(this.options.type){case"time":d=b(this.options.date,this);break;case"date":d=c(this.options.date,this);break;default:d=c(this.options.date,this)+"T"+b(this.options.date,this)}return d},setValue:function(a){return console.warn("setValue was deprecated. use datetimepicker('option', 'date', value) instead."),this.value(a)},getValue:function(){return console.warn("getValue() was deprecated. use datetimepicker('value') instead."),this.value()},_updateField:function(a,b){if(!a||a.length==0)return;b==0&&(b="0");var c=a.jqmData("pat"),d,e,f=this;switch(c){case"H":case"HH":case"h":case"hh":d=b,c.charAt(0)=="h"&&(d>12?d-=12:d==0&&(d=12)),d=this._makeTwoDigits(d),e=d;break;case"m":case"M":case"d":case"s":e=b;break;case"mm":case"dd":case"MM":case"ss":e=this._makeTwoDigits(b);break;case"MMM":e=this._calendar().months.namesAbbr[b-1];break;case"MMMM":e=this._calendar().months.names[b-1];break;case"yy":e=this._makeTwoDigits(b%100);break;case"yyyy":b<10?b="000"+b:b<100?b="00"+b:b<1e3&&(b="0"+b),e=b}a.text()!=e&&(a.hasClass("ui-datefield-selected")?(a.addClass("out"),this._new_value=e,a.animationComplete(function(){a.text(f._new_value),a.addClass("in").removeClass("out"),a.animationComplete(function(){a.removeClass("in").removeClass("ui-datefield-selected")})})):a.text(e))},_switchAmPm:function(a){if(this._calendar().AM!=null){var b=new Date(this.options.date),c,d=432e5;b.getHours()>11&&(d=-d),b.setTime(b.getTime()+d),this._setDate(b)}},_parsePattern:function(a){var b=/\/|\s|dd|d|MMMM|MMM|MM|M|yyyy|yy|y|hh|h|HH|H|mm|m|ss|s|tt|t|f|gg|g|\'[\w\W]*\'$|[\w\W]/g,c,d;c=a.match(b);for(d=0;d<c.length;d++)c[d].charAt(0)=="'"&&(c[d]=c[d].substr(1,c[d].length-2));return c},changeTypeFormat:function(a,b){console.warn('changeTypeFormat() was deprecated. use datetimepicker("option", "type"|"format", value) instead'),a&&this._setType(a),b&&this._setFormat(b)},_create:function(){var c=this;this.element.is("input")&&function(a){var b,c,d;b=a.element.get(0).getAttribute("type"),a.options.type=b,c=a.element.get(0).getAttribute("value"),c&&(a.options.date=new Date(c))}(this);if(!this.options.format)switch(this.options.type){case"datetime":this.options.format=this._calendar().patterns.d+"\t"+this._calendar().patterns.t;break;case"date":this.options.format=this._calendar().patterns.d;break;case"time":this.options.format=this._calendar().patterns.t}this.options.date||(this.options.date=new Date),this.element.hide(),this.ui=a('<div class="ui-datefield"></div>'),a(this.element).after(this.ui),this._popup_open=!1,this.ui.bind("vclick",function(a){return c._showDataSelector(c,this,a.target),!1}),a.extend(this,{_globalHandlers:[{src:a(b),handler:{orientationchange:a.proxy(this,"_orientationHandler")}}]}),a.each(this._globalHandlers,function(a,b){b.src.bind(b.handler)})},_orientationHandler:function(){var a=this;return a._popup_open&&(a._popup_open=!1,a.container.popupwindow("close")),!1},_populateDataSelector:function(a,c){var d,e,f,g,h=b.range,i,j,k,l;switch(a){case"hour":c=="H"||c=="HH"?(d=h(0,23),g=h(0,23),f=this.options.date.getHours()):(d=h(1,12),f=this.options.date.getHours()-1,f>=11?(f-=12,g=h(13,23),g.push(12)):(g=h(1,11),g.push(0)),f<0&&(f=11)),c.length==2&&(d=d.map(this._makeTwoDigits)),e=d.length;break;case"min":case"sec":d=h(0,59),c.length==2&&(d=d.map(this._makeTwoDigits)),g=h(0,59),f=a=="min"?this.options.date.getMinutes():this.options.date.getSeconds(),e=d.length;break;case"year":j=1900,k=2100,g=h(j,k),f=this.options.date.getFullYear()-j,d=h(j,k),e=d.length;break;case"month":switch(c.length){case 1:d=h(1,12);break;case 2:d=h(1,12).map(this._makeTwoDigits);break;case 3:d=this._calendar().months.namesAbbr.slice();break;case 4:d=this._calendar().months.names.slice()}d.length==13&&d[12]==""&&d.pop(),g=h(1,d.length),f=this.options.date.getMonth(),e=d.length;break;case"day":l=this._daysInMonth[this.options.date.getMonth()],l==28&&(l+=this._isLeapYear(this.options.date.getFullYear())),d=h(1,l),c.length==2&&(d=d.map(this._makeTwoDigits)),g=h(1,l),f=this.options.date.getDate()-1,e=l}return{values:d,data:g,numItems:e,current:f}},_showDataSelector:function(d,e,f){f=a(f);var g=f.attr("class"),h=g?g.match(/ui-datefield-([\w]*)/):c,i,j,k,l,m,n,o,p,q,r,s,t,u,v=10,w=this;if(!g)return;if(!h)return;if(this._popup_open)return;f.not(".ui-datefield-seperator").addClass("ui-datefield-selected"),i=f.jqmData("pat"),j=d._populateDataSelector.call(d,h[1],i),k=j.values,l=j.numItems,m=j.current,n=j.data;if(k){p="data-"+(a.mobile.ns?a.mobile.ns+"-":"")+'val="';for(u=0;u<k.length;u++)o+='<li><a class="ui-link" '+p+n[u]+'">'+k[u]+"</a></li>";q=a("<ul></ul>"),r=a('<div class="ui-datetimepicker-selector" data-transition="fade" data-fade="false"></div>'),r.append(q).appendTo(e),s=r.ctxpopup(),s.parents(".ui-popupwindow").addClass("ui-datetimepicker"),t=a(o),a(t[m]).addClass("current"),r.jqmData("list",t),r.circularview(),d._reflow||(d._reflow=function(){r.circularview("reflow"),r.circularview("centerTo",".current",0)},a(b).bind("resize",d._reflow)),a(b).width()/2<f.offset().left&&(v=-10),s.popupwindow("open",f.offset().left+f.width()/2+v-b.pageXOffset,f.offset().top+f.height()-b.pageYOffset),this.container=s,this._popup_open=!0,r.bind("popupafterclose",function(c){d._reflow&&(a(b).unbind("resize",d._reflow),d._reflow=null),!f.hasClass("in")&&!f.hasClass("out")&&f.removeClass("ui-datefield-selected"),r.unbind("popupafterclose"),q.unbind("vclick"),a(d).unbind("update"),s.popupwindow("destroy"),r.remove(),w._popup_open=!1}),a(d).bind("update",function(a,b){var c=new Date(this.options.date),e,f=function(){c.setDate(1),c.setDate(c.getDate()-1)};switch(h[1]){case"min":c.setMinutes(b);break;case"hour":c.setHours(b);break;case"sec":c.setSeconds(b);break;case"year":e=c.getMonth(),c.setFullYear(b),c.getMonth()!=e&&f();break;case"month":c.setMonth(b-1),c.getMonth()==b&&f();break;case"day":c.setDate(b)}d._setDate(c),s.popupwindow("close")}),q.bind("click",function(b){if(a(b.target).is("a")){q.find(".current").removeClass("current"),a(b.target).parent().addClass("current");var c=a(b.target).jqmData("val");a(d).trigger("update",c)}}),r.circularview("centerTo",".current",500),r.bind("scrollend",function(c){d._reflow||(d._reflow=function(){r.circularview("reflow")},a(b).bind("resize",d._reflow))})}return e}}),a(document).bind("pagecreate create",function(b){a(a.tizen.datetimepicker.prototype.options.initSelector,b.target).not(":jqmData(role='none'), :jqmData(role='nojs')").datetimepicker()})}(jQuery,this),function(a){a.tizen.frameworkData.pkgVersion="0.2.29"}(jQuery);